recusfiscaux/templates/versements_activites.tpl

84 lines
3.6 KiB
Smarty

<!-- nav bar -->
{include file="%s/templates/_nav.tpl"|args:$plugin_root current_nav="activite"}
<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>
<input type="submit" value="Générer les reçus" form="versements_activites"
onclick="return verifierChoix(this.form)" />
</fieldset>
<form method="post" id="versements_activites" action="generer_recus.php?type=activite">
{* 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;
?>
{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;
?>
{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;
?>
{afficher_debut_personne user=$personneCourante idVersement="%s_%s"|args:$tarifCourant,$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="%s_%s"|args:$tarifCourant,$personneCourante rang=$rang pair=$pair}
<?php $pair = ! $pair; ?>
{/foreach} {* Itération sur les versements *}
{fin_compte}
{fin_personne}
{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"}