Ajout du support des écritures ventilées.
[garradin.git] / templates / admin / compta / exercices / grand_livre.tpl
1 {include file="admin/_head.tpl" title="Grand livre" current="compta/exercices" body_id="rapport"}
2
3 <div class="exercice">
4 <h2>{$config.nom_asso|escape}</h2>
5 <p>Exercice comptable {if $exercice.cloture}clôturé{else}en cours{/if} du
6 {$exercice.debut|date_fr:'d/m/Y'} au {$exercice.fin|date_fr:'d/m/Y'}, généré le {$cloture|date_fr:'d/m/Y'}</p>
7 </div>
8
9 {foreach from=$livre.classes key="classe" item="comptes"}
10 <h3>{$classe|get_nom_compte|escape}</h3>
11
12 {foreach from=$comptes item="compte" key="code"}
13 {foreach from=$compte.comptes item="souscompte" key="souscode"}
14 <table class="list">
15 <caption><h4 class="num"><a href="{$admin_url}compta/comptes/journal.php?id={$souscode|escape}">{$souscode|escape}</a> — {$souscode|get_nom_compte|escape}</h4></caption>
16 <colgroup>
17 <col width="5%" />
18 <col width="10%" />
19 <col width="65%" />
20 <col width="10%" />
21 <col width="10%" />
22 </colgroup>
23 <thead>
24 <tr>
25 <th>N°</th>
26 <th>Date</th>
27 <th>Intitulé</th>
28 <th>Débit</th>
29 <th>Crédit</th>
30 </tr>
31 </thead>
32 <tbody>
33 {foreach from=$souscompte.journal item="ligne"}
34 <tr>
35 <td class="num"><a href="{$admin_url}compta/operations/voir.php?id={$ligne.id|escape}">{$ligne.id|escape}</a></td>
36 <td>{$ligne.date|date_fr:'d/m/Y'|escape}</td>
37 <th>{$ligne.libelle|escape}</th>
38 <td>{if $ligne.compte == $souscode && $ligne.montant > 0}{$ligne.montant|html_money}{/if}</td>
39 <td>{if $ligne.compte == $souscode && $ligne.montant < 0}{$ligne.montant|abs|html_money}{/if}</td>
40 </tr>
41 {/foreach}
42 </tbody>
43 <tfoot>
44 <tr>
45 <td></td>
46 <td></td>
47 <td><b>Solde final</b></td>
48 <td>{if $souscompte.debit != 0}{$souscompte.debit|html_money}{/if}</td>
49 <td>{if $souscompte.credit != 0}{$souscompte.credit|html_money}{/if}</td>
50 </tr>
51 </tfoot>
52 </table>
53 {/foreach}
54
55 <table class="list">
56 <colgroup>
57 <col width="15%" />
58 <col width="65%" />
59 <col width="10%" />
60 <col width="10%" />
61 </colgroup>
62 <tfoot>
63 <tr>
64 <td>Total</td>
65 <td><b><span class="num"><a href="{$admin_url}compta/comptes/journal.php?id={$code|escape}">{$code|escape}</a></span> — {$code|get_nom_compte|escape}</b></td>
66 <td>{if $compte.total > 0}{$compte.total|abs|html_money}{/if}</td>
67 <td>{if $compte.total < 0}{$compte.total|abs|html_money}{/if}</td>
68 </tr>
69 </tfoot>
70 </table>
71 {/foreach}
72 {/foreach}
73
74 <table class="list">
75 <colgroup>
76 <col width="15%" />
77 <col width="65%" />
78 <col width="10%" />
79 <col width="10%" />
80 </colgroup>
81 <tfoot>
82 <tr>
83 <td><strong>Total</strong></td>
84 <th></th>
85 <td>{$livre.debit|html_money}</td>
86 <td>{$livre.credit|html_money}</td>
87 </tr>
88 </tfoot>
89 </table>
90
91 <p class="help">Toutes les opérations sont libellées en {$config.monnaie|escape}.</p>
92
93 {include file="admin/_foot.tpl"}