2022-01-27 09:02:23 +01:00
|
|
|
<!-- nav bar -->
|
|
|
|
{include file="%s/templates/_nav.tpl"|args:$plugin_root current_nav="personne"}
|
|
|
|
|
2022-03-24 19:00:39 +01:00
|
|
|
<h2>Versements par personne</h2>
|
2022-01-27 09:02:23 +01:00
|
|
|
|
2022-03-29 14:50:25 +02:00
|
|
|
<fieldset class="noprint">
|
|
|
|
{* <div class="noprint"> *}
|
|
|
|
<input type="checkbox" class="check_global" id="check_global"
|
|
|
|
onclick="cocherDecocherToutesLesPersonnes(check_global)" />
|
2022-03-24 19:00:39 +01:00
|
|
|
<label for="check_global">Cliquer pour cocher toutes les lignes</label>
|
2022-03-29 14:50:25 +02:00
|
|
|
<button type="button" data-icon="↑" class="icn-btn" id="close_details_personne">Replier toutes les personnes</button>
|
|
|
|
<button type="button" data-icon="↓" class="icn-btn" id="open_details_personne">Déplier toutes les personnes</button>
|
|
|
|
{* </div> *}
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<form method="post" id="versements_personnes" action="generer_personnes.php">
|
2022-01-27 09:02:23 +01:00
|
|
|
|
2022-01-29 15:03:41 +01:00
|
|
|
{* Itération sur les personnes *}
|
2022-03-24 19:00:39 +01:00
|
|
|
{foreach from=$lesVersements key="i" item="versement"}
|
|
|
|
{if $i == 0}
|
|
|
|
{* 1ère personne *}
|
|
|
|
<?php
|
2022-03-29 14:50:25 +02:00
|
|
|
$personneCourante = $versement->idUser;
|
2022-03-24 19:00:39 +01:00
|
|
|
?>
|
|
|
|
{afficher_debut_personne versement=$versement}
|
|
|
|
{afficher_versement versement=$versement rang=$i}
|
|
|
|
{elseif $versement.idUser != $personneCourante}
|
|
|
|
{* changement de personne *}
|
|
|
|
</fieldset>
|
2022-03-29 14:50:25 +02:00
|
|
|
</details>
|
2022-03-24 19:00:39 +01:00
|
|
|
<?php
|
2022-03-29 14:50:25 +02:00
|
|
|
$personneCourante = $versement->idUser;
|
2022-03-24 19:00:39 +01:00
|
|
|
?>
|
|
|
|
{afficher_debut_personne versement=$versement}
|
|
|
|
{afficher_versement versement=$versement rang=$i}
|
|
|
|
{else}
|
|
|
|
{* même personne *}
|
|
|
|
{afficher_versement versement=$versement rang=$i}
|
|
|
|
{/if}
|
|
|
|
{/foreach} {* Itération sur les personnes *}
|
|
|
|
</fieldset>
|
2022-03-29 14:50:25 +02:00
|
|
|
</details>
|
2022-01-27 09:02:23 +01:00
|
|
|
|
|
|
|
<input type="submit" value="Générer les reçus" onclick="return verifierChoix(this.form)">
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{* scripts pour cases à cocher *}
|
|
|
|
<script src="script.js"></script>
|
|
|
|
|
2022-03-29 14:50:25 +02:00
|
|
|
{literal}
|
|
|
|
<script type="text/javascript">
|
|
|
|
// ouvrir/fermer les détails
|
|
|
|
document.querySelector('#open_details_personne').onclick = () => {
|
|
|
|
document.querySelectorAll('details.personne').forEach((e) => {
|
|
|
|
e.setAttribute('open', 'open');
|
|
|
|
});
|
|
|
|
};
|
|
|
|
document.querySelector('#close_details_personne').onclick = () => {
|
|
|
|
document.querySelectorAll('details.personne').forEach((e) => {
|
|
|
|
e.removeAttribute('open');
|
|
|
|
});
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
{/literal}
|
|
|
|
|
2022-01-27 09:02:23 +01:00
|
|
|
<!-- footer -->
|
2022-03-29 14:50:25 +02:00
|
|
|
{include file="admin/_foot.tpl"}
|