recusfiscaux/templates/versements_activites.tpl

104 lines
3.7 KiB
Smarty

<!-- nav bar -->
{include file="%s/templates/_nav.tpl"|args:$plugin_root current_nav="activite"}
<h2>Année {$annee_recu} : versements par activité et tarif</h2>
<fieldset class="noprint">
<dl>
<dd>
<label class="strong">Total des cases cochées : </label>
<span class="total" id="total_general">0,00 €</span>
</dd>
<dd>
<input type="checkbox" class="check_global" id="check_global" onclick="cocherDecocherTout(check_global, total_general)" />
<label for="check_global">Cliquer pour cocher toutes les lignes</label>
</dd>
<dd>
<button type="button" data-icon="↑" class="icn-btn" id="close_details_activite"
onclick="montrerMasquerDetails(this.id, 'details.activite', 'toutes les activités')">
Replier toutes les activités</button>
<button type="button" data-icon="↑" class="icn-btn" id="close_details_personne"
onclick="montrerMasquerDetails(this.id, 'details.personne', 'toutes les personnes')">
Replier toutes les personnes</button>
</dd>
<dd>
{button type="submit" label="Télécharger les reçus au format PDF" shape="download"
form="versements_activites"
formaction="generer_recus.php?type=activite&format=pdf"
onclick="return verifierChoix(this.form)"}
{button type="submit" target="_dialog" label="Imprimer les reçus" shape="print"
form="versements_activites"
formaction="generer_recus.php?type=activite&format=print"
onclick="return verifierChoix(this.form)"}
</dd>
</dl>
</fieldset>
<form method="post" target="_blank" id="versements_activites" data-disable-progress="1">
{* Itération sur les versements *}
{foreach from=$lesVersements key="rang" item="versement"}
{if $rang == 0}
{* premier versement *}
<?php
$pair = true;
$tarifCourant = $versement->idTarif;
$personneCourante = $versement->idUser;
$compteCourant = $versement->idCompte;
$codeCompte = $versement->codeCompte;
?>
{afficher_debut_tarif versement=$versement}
{afficher_debut_personne user=$personneCourante idVersement="%s_%s"|args:$tarifCourant,$personneCourante}
{afficher_debut_compte idCompte=$compteCourant}
{elseif $versement.idTarif != $tarifCourant}
{* changement de tarif *}
{fin_compte}
{fin_personne}
{fin_tarif}
<?php
$pair = true;
$tarifCourant = $versement->idTarif;
$personneCourante = $versement->idUser;
$compteCourant = $versement->idCompte;
$codeCompte = $versement->codeCompte;
?>
{afficher_debut_tarif versement=$versement}
{afficher_debut_personne user=$personneCourante idVersement="%s_%s"|args:$tarifCourant,$personneCourante}
{afficher_debut_compte idCompte=$compteCourant}
{elseif $versement.idUser != $personneCourante}
{* changement de personne *}
{fin_compte}
{fin_personne}
<?php
$pair = true;
$personneCourante = $versement->idUser;
$compteCourant = $versement->idCompte;
$codeCompte = $versement->codeCompte;
?>
{afficher_debut_personne user=$personneCourante idVersement="%s_%s"|args:$tarifCourant,$personneCourante}
{afficher_debut_compte idCompte=$compteCourant}
{elseif $versement.codeCompte != $codeCompte}
{fin_compte}
{* changement de compte *}
<?php
$pair = true;
$compteCourant = $versement->idCompte;
$codeCompte = $versement->codeCompte;
?>
{afficher_debut_compte idCompte=$compteCourant}
{else}
{* même personne, même compte *}
{/if}
{afficher_versement versement=$versement idVersement="%s_%s"|args:$tarifCourant,$personneCourante rang=$rang pair=$pair}
<?php $pair = ! $pair; ?>
{/foreach} {* Itération sur les versements *}
{fin_compte}
{fin_personne}
{fin_tarif}
</form>
{* scripts divers *}
<script src="script.js"></script>
<!-- footer -->
{include file="_foot.tpl"}