{foreach from=$comptes item="compte" key="code"}
{foreach from=$compte.comptes item="souscompte" key="souscode"}
<table class="list">
- <caption><h4>{$souscode|escape} — {$souscode|get_nom_compte|escape}</h4></caption>
+ <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>
<colgroup>
- <col width="15%" />
+ <col width="5%" />
+ <col width="10%" />
<col width="65%" />
<col width="10%" />
<col width="10%" />
</colgroup>
<thead>
<tr>
- <td>Date</td>
+ <th>N°</th>
+ <th>Date</th>
<th>Intitulé</th>
- <td>Débit</td>
- <td>Crédit</td>
+ <th>Débit</th>
+ <th>Crédit</th>
</tr>
</thead>
<tbody>
{foreach from=$souscompte.journal item="ligne"}
<tr>
+ <td class="num"><a href="{$admin_url}compta/operations/voir.php?id={$ligne.id|escape}">{$ligne.id|escape}</a></td>
<td>{$ligne.date|date_fr:'d/m/Y'|escape}</td>
<th>{$ligne.libelle|escape}</th>
- <td>{if $ligne.compte_debit == $souscode}{$ligne.montant|html_money}{/if}</td>
- <td>{if $ligne.compte_credit == $souscode}{$ligne.montant|html_money}{/if}</td>
+ <td>{if $ligne.compte == $souscode && $ligne.montant > 0}{$ligne.montant|html_money}{/if}</td>
+ <td>{if $ligne.compte == $souscode && $ligne.montant < 0}{$ligne.montant|abs|html_money}{/if}</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td></td>
- <th>Solde final</th>
- <td>{if $souscompte.debit > 0}{$souscompte.debit|html_money}{/if}</td>
- <td>{if $souscompte.credit > 0}{$souscompte.credit|html_money}{/if}</td>
+ <td></td>
+ <td><b>Solde final</b></td>
+ <td>{if $souscompte.debit != 0}{$souscompte.debit|html_money}{/if}</td>
+ <td>{if $souscompte.credit != 0}{$souscompte.credit|html_money}{/if}</td>
</tr>
</tfoot>
</table>
<tfoot>
<tr>
<td>Total</td>
- <th>{$code|get_nom_compte|escape}</th>
+ <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>
<td>{if $compte.total > 0}{$compte.total|abs|html_money}{/if}</td>
<td>{if $compte.total < 0}{$compte.total|abs|html_money}{/if}</td>
</tr>
<p class="help">Toutes les opérations sont libellées en {$config.monnaie|escape}.</p>
-{include file="admin/_foot.tpl"}
\ No newline at end of file
+{include file="admin/_foot.tpl"}