Files
afup/htdocs/templates/administration/compta_banque.html
2020-03-22 11:08:24 +01:00

152 lines
6.5 KiB
HTML

{if $action == 'lister'}
<h2>Journal de banque</h2>
<div class="ui top attached tabular menu">
{foreach from=$listeComptes item=compte key=id}
<a class="{if $id == $compte_id }active{/if} item" href="index.php?id_periode={$smarty.get.id_periode}&amp;page=compta_banque&amp;compte={$id}&amp;action=lister">
{$compte}
</a>
{/foreach}
</div>
<div class="ui bottom attached segment">
<div class="ui green segment">
<form method="GET" name="forum">
<input type="hidden" name="compte" value="{$smarty.get.compte}" />
<input type="hidden" name="page" value="compta_banque" />
<div class="ui form">
<div class="inline fields">
<div class="field">
<label>Année comptable</label>
<select name="id_periode" onchange="this.form.submit(); return false;">
{foreach from=$listPeriode item=periode}
<option value="{$periode.id}"{if $id_periode == $periode.id} selected{/if}>{$periode.date_debut} - {$periode.date_fin}</option>
{/foreach}
</select>
</div>
</div>
</div>
</form>
</div>
<div class="ui menu">
<a href="index.php?id_periode={$smarty.get.id_periode}&amp;page=compta_banque&amp;compte={$compte_id}&amp;action=exporter" class="item">
<i class="icon file excel"></i>
Export XLSX
</a>
<a href="index.php?id_periode={$smarty.get.id_periode}&amp;page=compta_banque&amp;compte={$compte_id}&amp;action=download_attachments" class="item">
<i class="icon file zip"></i>
Télécharger les justificatifs triés par mois
</a>
</div>
<table class="ui table striped compact celled">
<thead>
<tr>
<th>Date</th>
<th>Operation</th>
<th>Description</th>
<th class="right aligned">Dépense</th>
<th class="right aligned">Recette</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{assign var=compteurLigne value=1}
{foreach from=$journal item=ecriture}
<tr>
<td>{$ecriture.date_regl|date_format:"%d/%m/%Y"}</td>
<td>{$ecriture.reglement}</td>
<td>{$ecriture.description}</td>
{if $ecriture.idoperation == 1}
<td class="right aligned">{$ecriture.montant|number_format:2:',':' '}</td>
<td> </td>
{else}
<td> </td>
<td class="right aligned">{$ecriture.montant|number_format:2:',':' '}</td>
{/if}
<td class="right aligned">
<a href="index.php?page=compta_journal&amp;action=modifier&amp;id={$ecriture.idtmp}"
data-position="left center"
data-tooltip="Modifier la ligne {$ecriture.description}"
class="compact ui icon button"
>
<i class="pencil alernate icon"></i>
</a>
</td>
</tr>
{foreach from=$sousTotal item=txt}
{if $ecriture.mois == $txt.mois && $compteurLigne == $txt.nligne }
<tr>
<td colspan="3" class="right aligned">
<b><i>Sous Total</i></b>
</td>
<td class="right aligned">
<b><i></i>{if $txt.debit}{$txt.debit|number_format:2:',':' '}{else}0,00{/if}</i></b>
</td>
<td class="right aligned">
<b><i></i>{if $txt.credit}{$txt.credit|number_format:2:',':' '}{else}0,00{/if}</i></b>
</td>
<td class="right aligned">
<b><i>{$txt.dif|number_format:2:',':' '}</i></b>
</td>
</tr>
{assign var=compteurLigne value=0}
{/if}
{/foreach}
{assign var=compteurLigne value=$compteurLigne+1}
{foreachelse}
<tr>
<td><em>Aucune ecriture actuellement</em></td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<th colspan="3"></td>
<th class="center aligned">
<div class="ui mini statistic">
<div class="value">
{$total.debit|number_format:2:',':' '}
</div>
<iv class="label">
Total débit
</iv>
</div>
</th>
<th class="center aligned">
<div class="ui mini statistic">
<div class="value">
{$total.credit|number_format:2:',':' '}
</div>
<iv class="label">
Total crédit
</iv>
</div>
</th>
<th>&nbsp;</th>
</tr>
<tr>
<th colspan="3"></th>
<th colspan="2" class="center aligned">
<div class="ui tiny statistic">
<div class="value">
{$total.dif|number_format:2:',':' '}
</div>
<iv class="label">
Solde
</iv>
</div>
</th>
<th>&nbsp;</th>
</tr>
</tfoot>
</table>
</div>
{/if}