recusfiscaux/templates/versements_personnes.tpl

55 lines
2.1 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" action="generer_recus.php?type=personne">
{* Itération sur les personnes *}
<?php $rang = 0; ?>
{foreach from=$lesVersements item="versement"}
{if $rang == 0}
{* 1ère personne *}
<?php
$personneCourante = $versement->idUser;
?>
{afficher_debut_personne user=$personneCourante idVersement=$personneCourante}
{afficher_versement versement=$versement idVersement=$personneCourante rang=$rang}
{elseif $versement.idUser != $personneCourante}
{* changement de personne *}
<?php $rang = 0; ?>
</fieldset>
</details>
<?php
$personneCourante = $versement->idUser;
?>
{afficher_debut_personne user=$personneCourante idVersement=$personneCourante}
{afficher_versement versement=$versement idVersement=$personneCourante rang=$rang}
{else}
{* même personne *}
{afficher_versement versement=$versement idVersement=$personneCourante rang=$rang}
{/if}
<?php ++$rang; ?>
{/foreach} {* Itération sur les personnes *}
</fieldset>
</details>
<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"}