recusfiscaux/templates/versements_activites.tpl

66 lines
3.3 KiB
Smarty

<!-- nav bar -->
{include file="%s/templates/_nav.tpl"|args:$plugin_root current_nav="versements"}
<h2>Versements par activité et tarif</h2>
<fieldset class="noprint">
<input type="checkbox" class="check_global" id="check_global" onclick="cocherDecocherTout(check_global)" />
<label for="check_global">Cliquer pour cocher toutes les lignes</label>
<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>
</fieldset>
<form method="post" id="versements_activites" action="generer_recus.php?type=activite">
{* Itération sur les versements *}
{foreach from=$lesVersements key="i" item="versement"}
{if $i == 0}
{* premier versement *}
<?php
$tarifCourant = $versement->idTarif;
$personneCourante = $versement->idUser;
?>
{afficher_debut_tarif versement=$versement}
{afficher_debut_personne user=$personneCourante idVersement="%s_%s"|args:$tarifCourant,$personneCourante}
{afficher_versement versement=$versement idVersement="%s_%s"|args:$tarifCourant,$personneCourante rang=$i}
{else}
{* autre versement *}
{if $versement.idTarif != $tarifCourant}
{* changement de tarif *}
</fieldset> {* fin versements d'une personne *}
</details> {* fin versements d'une personne *}
</details> {* fin tarif *}
<?php
$tarifCourant = $versement->idTarif;
$personneCourante = $versement->idUser;
?>
{afficher_debut_tarif versement=$versement}
{afficher_debut_personne user=$personneCourante idVersement="%s_%s"|args:$tarifCourant,$personneCourante}
{afficher_versement versement=$versement idVersement="%s_%s"|args:$tarifCourant,$personneCourante rang=$i}
{elseif $versement.idUser != $personneCourante}
{* changement de personne *}
</fieldset>
</details>
<?php
$personneCourante = $versement->idUser;
?>
{afficher_debut_personne user=$personneCourante idVersement="%s_%s"|args:$tarifCourant,$personneCourante}
{afficher_versement versement=$versement idVersement="%s_%s"|args:$tarifCourant,$personneCourante rang=$i}
{else}
{* même personne *}
{afficher_versement versement=$versement idVersement="%s_%s"|args:$tarifCourant,$personneCourante rang=$i}
{/if}
{/if}
{/foreach} {* Itération sur les versements *}
</fieldset> {* fin versements d'une personne *}
</details> {* fin versements d'une personne *}
</details> {* fin tarif *}
<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"}