Files
afup/htdocs/templates/administration/cotisations.html
2020-05-16 16:09:14 +02:00

105 lines
4.7 KiB
HTML

{if $action == 'lister'}
{if $type_personne == $smarty.const.AFUP_PERSONNES_PHYSIQUES}
<h2>Cotisations de {$personne.prenom} {$personne.nom}</h2>
{else}
<h2>Cotisations de {$personne.raison_sociale}</h2>
{/if}
<div class="ui menu">
<a href="index.php?page=cotisations&amp;action=ajouter&amp;type_personne={$type_personne}&amp;id_personne={$id_personne}" class="item">
<div data-tooltip="Ajouter une cotisation" data-position="bottom left">
<i class="icon plus square"></i>
Ajouter
</div>
</a>
{if $type_personne == 0}
<a href="/admin/members/users/edit?id={$id_personne}" class="item">
<i class="user icon"></i>
Voir la fiche de la personne physique
</a>
{else}
<a href="index.php?page=personnes_morales&amp;action=modifier&amp;id={$id_personne}" class="item" >
<i class="building icon"></i>
Voir la fiche de la personne morale
</a>
{/if}
</div>
<h3>Historique</h3>
<table class="ui table striped compact celled">
<thead>
<tr>
<th>Date de début</th>
<th>Date de fin</th>
<th class="right aligned">Montant</th>
<th>Description</th>
<th class="right aligned">Actions</th>
</tr>
</thead>
{foreach from=$cotisations item=cotisation}
<tr>
<td>{$cotisation.date_debut|date_format:'%d/%m/%y'}</td>
<td>{$cotisation.date_fin|date_format:'%d/%m/%y'}</td>
<td class="right aligned">{$cotisation.montant} &euro;</td>
<td>
{if $cotisation.type_reglement == $smarty.const.AFUP_COTISATIONS_REGLEMENT_ESPECES}
en espèces
{elseif $cotisation.type_reglement == $smarty.const.AFUP_COTISATIONS_REGLEMENT_CHEQUE}
par chèque n° {$cotisation.informations_reglement}
{elseif $cotisation.type_reglement == $smarty.const.AFUP_COTISATIONS_REGLEMENT_VIREMENT}
par virement n° {$cotisation.informations_reglement}
{elseif $cotisation.type_reglement == $smarty.const.AFUP_COTISATIONS_REGLEMENT_ENLIGNE}
en ligne
{/if}
</td>
<td class="right aligned">
<a href="index.php?page=cotisations&amp;action=envoyer_facture&amp;type_personne={$type_personne}&amp;id_personne={$id_personne}&amp;id={$cotisation.id}"
data-position="left center"
data-tooltip="Envoyer la facture par mail"
class="compact ui icon button"
>
<i class="paper plane icon"></i>
</a>
<a href="index.php?page=cotisations&amp;action=telecharger_facture&amp;type_personne={$type_personne}&amp;id_personne={$id_personne}&amp;id={$cotisation.id}"
data-position="left center"
data-tooltip="Télécharger la facture"
class="compact ui icon button"
>
<i class="file pdf icon"></i>
</a>
<a href="index.php?page=cotisations&amp;action=modifier&amp;type_personne={$type_personne}&amp;id_personne={$id_personne}&amp;id={$cotisation.id}"
data-position="left center"
data-tooltip="Modifier la cotisation"
class="compact ui icon button"
>
<i class="pencil alernate icon"></i>
</a>
<a href="index.php?page=cotisations&amp;action=supprimer&amp;type_personne={$type_personne}&amp;id_personne={$id_personne}&amp;id={$cotisation.id}"
data-position="left center"
data-tooltip="Supprimer la cotisation"
class="compact ui red icon button"
onclick="return confirm('Etes-vous sûr de vouloir supprimer cette cotisation ?');"
>
<i class="trash icon"></i>
</a>
</td>
</tr>
{foreachelse}
<tr>
<td><em>Aucune cotisation</em></td>
</tr>
{/foreach}
</table>
{else}
{if $action == 'ajouter'}
<h2>Ajouter une cotisation</h2>
{else}
<h2>Modifier une cotisation</h2>
{/if}
{include file="formulaire.html"}
{/if}