recusfiscaux/templates/versements_personnes.tpl

65 lines
2.5 KiB
Smarty

<!-- nav bar -->
{include file="%s/templates/_nav.tpl"|args:$plugin_root current_nav="personne"}
<h2>Versements par personne</h2>
<fieldset class="noprint">
<input type="checkbox" class="check_global" id="check_global"
onclick="cocherDecocherToutesLesPersonnes(check_global)" />
<label for="check_global">Cliquer pour cocher toutes les lignes</label>
<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>
<input type="submit" value="Générer les reçus" form="versements_personnes"
onclick="return verifierChoix(this.form)" />
</fieldset>
<form method="post" id="versements_personnes" class="" action="generer_recus.php?type=personne">
{* Itération sur les personnes *}
{foreach from=$lesVersements key="rang" item="versement"}
{if $rang == 0}
{* 1ère personne *}
<?php
$pair = true;
$personneCourante = $versement->idUser;
$compteCourant = $versement->idCompte;
?>
{afficher_debut_personne user=$personneCourante idVersement=$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;
?>
{afficher_debut_personne user=$personneCourante idVersement=$personneCourante}
{afficher_debut_compte idCompte=$compteCourant}
{elseif $versement.idCompte != $compteCourant}
{fin_compte}
{* changement de compte *}
<?php
$pair = true;
$compteCourant = $versement->idCompte;
?>
{afficher_debut_compte idCompte=$compteCourant}
{else}
{* même personne, même compte *}
{/if}
{afficher_versement versement=$versement idVersement=$personneCourante rang=$rang pair=$pair}
<?php $pair = ! $pair; ?>
{/foreach} {* Itération sur les personnes *}
{fin_compte}
{fin_personne}
<input type="submit" value="Générer les reçus" onclick="return verifierChoix(this.form)" />
</form>
{* scripts divers *}
<script src="script.js"></script>
<!-- footer -->
{include file="admin/_foot.tpl"}