Normalisation attribut (Utils.php) ; ajout onglet Configuration ; préparation choix méthode de génération de reçus
FossilOrigin-Name: 08d84642c176039d5b91135007ba419f5cae36eca6445b55d0ed47b7db362df9
This commit is contained in:
parent
fa590c0d67
commit
a59923348f
11 changed files with 223 additions and 107 deletions
|
|
@ -7,5 +7,8 @@
|
|||
<li{if $current_nav == 'index'} class="current"{/if}><a href="{plugin_url}">Activités et tarifs</a></li>
|
||||
<li{if $current_nav == 'personne'} class="current"{/if}><a href="{plugin_url file="personne.php"}">Versements totaux par personne</a></li>
|
||||
<li{if $current_nav == 'versements'} class="current"{/if}><a href="{plugin_url file="versements.php"}">Tous les versements</a></li>
|
||||
{if $session->canAccess($session::SECTION_ACCOUNTING, $session::ACCESS_WRITE)}
|
||||
<li{if $current_nav == 'config'} class="current"{/if}><a href="{plugin_url file="config.php"}">Configuration</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -1,31 +1,117 @@
|
|||
<!-- nav bar -->
|
||||
{include file="%s/templates/_nav.tpl"|args:$plugin_root current_nav="index"}
|
||||
|
||||
<h2>Liste des activités, cotisations et comptes associés</h2>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Description</th>
|
||||
<th>Tarif</th>
|
||||
<th>Description</th>
|
||||
<th>N° Compte</th>
|
||||
<th>Nom Compte</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$activitesTarifsComptes item="activite"}
|
||||
<tr>
|
||||
<td>{$activite.label}</td>
|
||||
<td>{$activite.descService}</td>
|
||||
<td>{$activite.tarif}</td>
|
||||
<td>{$activite.descTarif}</td>
|
||||
<td>{$activite.numero_cpt}</td>
|
||||
<td>{$activite.nom_cpt}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<h2>Choisir l'année fiscale</h2>
|
||||
<form>
|
||||
<fieldset>
|
||||
{* <legend>Choisir l'année fiscale</legend> *}
|
||||
<select id="annee_recu" name="annee_recu">
|
||||
{foreach from=$anneesFiscales item="annee"}
|
||||
<option value="{$annee}" {if $annee == $anneeCourante - 1} selected{/if}>{$annee}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</fieldset>
|
||||
|
||||
<div id="choix_methode">
|
||||
<h2>Choisir une méthode de génération des reçus</h2>
|
||||
|
||||
<fieldset>
|
||||
{* <legend>Choisir une des méthodes</legend> *}
|
||||
<dl>
|
||||
<dd class="radio-btn">
|
||||
<input type="radio" id="radio_tous_versements" name="choix_versements" value="tous_versements"
|
||||
onclick="afficherMasquer(this.form, '.tous', '.activites');" />
|
||||
<label for="radio_tous_versements">
|
||||
<div>
|
||||
<h5>
|
||||
Tous les versements des membres font l'objet d'un reçu, sans
|
||||
tenir compte des activités et tarifs
|
||||
</h5>
|
||||
</div>
|
||||
</label>
|
||||
</dd>
|
||||
|
||||
<dd class="radio-btn">
|
||||
<input type="radio" id="radio_versements_activites" name="choix_versements"
|
||||
value="versements_activites"
|
||||
onclick="afficherMasquer(this.form, '.activites', '.tous');" />
|
||||
<label for="radio_versements_activites">
|
||||
<div>
|
||||
<h5>
|
||||
Seuls les versements de certaines activités et tarifs font
|
||||
l'objet d'un reçu
|
||||
</h5>
|
||||
</div>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div id="generer_tous" class="tous hidden">
|
||||
<p class=" submit">
|
||||
{csrf_field key="generer_tous_recus"}
|
||||
{button type="submit" name="generer_tous" label="Générer" shape="right" class="main"}
|
||||
</p>
|
||||
</div>
|
||||
<div id="liste_activites_tarifs" class="activites hidden">
|
||||
<h2>Choisir les activités et tarifs concernés par les reçus ainsi que le taux de réduction</h2>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Cocher</th>
|
||||
<th>Activité et Tarif</th>
|
||||
<th>Taux de réduction</th>
|
||||
<th>Caractéristiques activité</th>
|
||||
<th>N° et Compte</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$activitesTarifsComptes item="activite"}
|
||||
<tr>
|
||||
<td>
|
||||
{input type="checkbox" name="tarifs[]" value=$activite.idTarif}
|
||||
</td>
|
||||
<td>
|
||||
<span>{$activite.titreActivite} - {$activite.titreTarif}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="radio-btn">
|
||||
<input type="radio" id="taux_normal_{$activite.idTarif}"
|
||||
name="taux_reduction_{$activite.idTarif}" value="taux_normal" />
|
||||
<label for="taux_normal_{$activite.idTarif}">normal</label>
|
||||
</span>
|
||||
<span class=" radio-btn">
|
||||
<input type="radio" id="taux_majore_{$activite.idTarif}"
|
||||
name="taux_reduction_{$activite.idTarif}" value="taux_majore" />
|
||||
<label for="taux_majore_{$activite.idTarif}">majoré</label>
|
||||
</span>
|
||||
</td>
|
||||
<td>{if $activite.descActivite != ""}{$activite.descActivite} ; {/if}{$activite.descTarif}</td>
|
||||
<td>{$activite.numeroCpt} : {$activite.nomCpt}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="help">Si vous ne savez pas quel taux de réduction utiliser, n'en choisissez aucun</p>
|
||||
</div>
|
||||
|
||||
<div id="generer_activites" class="activites hidden">
|
||||
<p class=" submit">
|
||||
{csrf_field key="generer_recus_activites"}
|
||||
{button type="submit" name="generer_activites" label="Générer" shape="right" class="main"}
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
<script defer type="text/javascript" src="script.js"></script>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
// function afficherMasquer(formulaire, class1, visible1, class2, visible2) {
|
||||
// afficher(formulaire, elem1, visible1);
|
||||
// afficher(formulaire, elem2, visible2);
|
||||
// }
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
<!-- footer -->
|
||||
{include file="admin/_foot.tpl"}
|
||||
|
|
@ -10,10 +10,7 @@
|
|||
<thead class="userOrder">
|
||||
<tr>
|
||||
<th class="check">
|
||||
<input
|
||||
type="checkbox"
|
||||
title="Tout cocher / décocher"
|
||||
id="f_all" />
|
||||
<input type="checkbox" title="Tout cocher / décocher" id="f_all" />
|
||||
<label for="f_all"></label>
|
||||
</th>
|
||||
<th>Id</th>
|
||||
|
|
@ -28,12 +25,12 @@
|
|||
{foreach from=$lesVersementsTotaux item="versement"}
|
||||
<tr>
|
||||
<td class="check">
|
||||
{input
|
||||
type="checkbox"
|
||||
name="selected[]"
|
||||
value=$versement.id}
|
||||
</td>
|
||||
<td>{$versement.id}</td>
|
||||
{input
|
||||
type="checkbox"
|
||||
name="selected[]"
|
||||
value=$versement.idUser}
|
||||
</td>
|
||||
<td>{$versement.idUser}</td>
|
||||
<td>{$versement.nom}</td>
|
||||
<td class="montant">{$versement.montant|raw|money}</td>
|
||||
<td>{$versement.adresse}</td>
|
||||
|
|
|
|||
|
|
@ -12,11 +12,7 @@
|
|||
<form method="post" action="action.php" class="memberList">
|
||||
|
||||
<fieldset class="versements" id="versements_global">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="check_global"
|
||||
id="check_global"
|
||||
onclick="cocherDecocherTout(check_global)" />
|
||||
<input type="checkbox" class="check_global" id="check_global" onclick="cocherDecocherTout(check_global)" />
|
||||
<label for="check_global">Cliquer pour cocher toutes les lignes</label>
|
||||
</fieldset>
|
||||
|
||||
|
|
@ -32,20 +28,21 @@
|
|||
{if !empty($activite->description)}
|
||||
<h4>{$activite->description}</h4>
|
||||
{/if}
|
||||
<h4>tarif « {$tarif->titreTarif} », montant : {if $tarif->montantTarif > 0}{$tarif->montantTarif}
|
||||
<h4>tarif « {$tarif->titreTarif} », montant :
|
||||
{if $tarif->montantTarif > 0}{$tarif->montantTarif|raw|money}
|
||||
€{else}libre
|
||||
{/if}
|
||||
</h4>
|
||||
</summary>
|
||||
|
||||
{*
|
||||
{*
|
||||
Itération sur les versements d'un tarif d'une activité
|
||||
présentation : une table pour les versements d'une personne
|
||||
*}
|
||||
<?php $currentUser = -1; $firstUser = true; ?>
|
||||
{foreach from=$lesVersements key="rang" item="versement"}
|
||||
{if $versement.idActivite == $activite->id &&
|
||||
$versement.idTarif == $tarif->idTarif}
|
||||
<?php $currentUser = -1; $firstUser = true; ?>
|
||||
{foreach from=$lesVersements key="rang" item="versement"}
|
||||
{if $versement.idActivite == $activite->idActivite &&
|
||||
$versement.idTarif == $tarif->idTarif}
|
||||
{if $versement.idUser != $currentUser}
|
||||
{* changement de personne *}
|
||||
{if $firstUser}
|
||||
|
|
@ -58,34 +55,27 @@
|
|||
<?php $idVersements = $versement->idTarif."_".$versement->idUser; ?>
|
||||
<h3 class="personne">Versements de {$versement.nom} : <span id="total_{$idVersements}">0,00 €</span></h3>
|
||||
<fieldset class="versements" id="versements_{$idVersements}">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="check_{$idVersements}"
|
||||
id="check_{$idVersements}"
|
||||
onclick="cocherDecocherPersonne(check_{$idVersements}, total_{$idVersements})" />
|
||||
<input type="checkbox" class="check_{$idVersements}" id="check_{$idVersements}"
|
||||
onclick="cocherDecocherPersonne(check_{$idVersements}, total_{$idVersements})" />
|
||||
<label for="check_{$idVersements}">Cliquer pour cocher toutes les lignes</label>
|
||||
<br />
|
||||
<hr>
|
||||
<?php $currentUser = $versement->idUser; ?>
|
||||
<?php $currentUser = $versement->idUser; ?>
|
||||
{/if}
|
||||
{* afficher les infos du versement de la personne*}
|
||||
<div {if $rang%2==0}class="pair" {else}class="impair" {/if}>
|
||||
<input type="checkbox" class="check_{$idVersements}" id="check_{$idVersements}_{$rang}"
|
||||
name="selected[]" value={$rang}
|
||||
onclick="cocherDecocherVersement(check_{$idVersements}_{$rang}, total_{$idVersements})" />
|
||||
<label for=check_{$idVersements}_{$rang}></label>
|
||||
<span class="montant">{$versement.versement|raw|money}</span>
|
||||
<span>{$versement.date|date_format:"%d/%m/%Y"}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{* afficher les infos du versement de la personne*}
|
||||
<div {if $rang%2==0}class="pair"{else}class="impair"{/if}>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="check_{$idVersements}"
|
||||
id="check_{$idVersements}_{$rang}"
|
||||
name="selected[]"
|
||||
value={$rang}
|
||||
onclick="cocherDecocherVersement(check_{$idVersements}_{$rang}, total_{$idVersements})" />
|
||||
<label for=check_{$idVersements}_{$rang}></label>
|
||||
<span class="montant">{$versement.versement|raw|money}</span>
|
||||
<span>{$versement.date|date_format:"%d/%m/%Y"}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach} {* Itération sur les versements *}
|
||||
{/foreach} {* Itération sur les versements *}
|
||||
</fieldset>
|
||||
</details>
|
||||
{/foreach} {* Itération sur les tarifs de l'activité *}
|
||||
{/foreach} {* Itération sur les tarifs de l'activité *}
|
||||
{/foreach} {* Itération sur les activités *}
|
||||
|
||||
<input type="submit" value="Générer les reçus" onclick="return verifierChoix(this.form)">
|
||||
|
|
@ -95,19 +85,19 @@
|
|||
<script src="script.js"></script>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
// ouvrir/fermer les détails
|
||||
document.querySelector('#open_details').onclick = () => {
|
||||
document.querySelectorAll('details').forEach((e) => {
|
||||
e.setAttribute('open', 'open');
|
||||
});
|
||||
};
|
||||
document.querySelector('#close_details').onclick = () => {
|
||||
document.querySelectorAll('details').forEach((e) => {
|
||||
e.removeAttribute('open');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
// ouvrir/fermer les détails
|
||||
document.querySelector('#open_details').onclick = () => {
|
||||
document.querySelectorAll('details').forEach((e) => {
|
||||
e.setAttribute('open', 'open');
|
||||
});
|
||||
};
|
||||
document.querySelector('#close_details').onclick = () => {
|
||||
document.querySelectorAll('details').forEach((e) => {
|
||||
e.removeAttribute('open');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
<!-- footer -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue