Ajout du support des écritures ventilées.
[garradin.git] / templates / admin / compta / exercices / journal.tpl
index 5e0e7e6..0eee3ac 100644 (file)
@@ -9,26 +9,29 @@
 <table class="list multi">
     <thead>
         <tr>
-            <td>Date</td>
+            <th>N°</th>
+            <th>Date</th>
             <th>Intitulé</th>
-            <td>Comptes</td>
-            <td>Débit</td>
-            <td>Crédit</td>
+            <th colspan="2">Comptes</th>
+            <th>Débit</th>
+            <th>Crédit</th>
         </tr>
     </thead>
     <tbody>
     {foreach from=$journal item="ligne"}
-        <tr>
-            <td rowspan="2">{$ligne.date|date_fr:'d/m/Y'|escape}</td>
-            <th rowspan="2">{$ligne.libelle|escape}</th>
-            <td>{$ligne.compte_debit|escape} - {$ligne.compte_debit|get_nom_compte|escape}</td>
+        <tr class='{if $ligne.id % 2 == 0}even{else}odd{/if}'>
+            <td class="num">{if isset($ligne.date)}<a href="{$admin_url}compta/operations/voir.php?id={$ligne.id|escape}">{$ligne.id|escape}</a>{/if}</td>
+            <td>{if isset($ligne.date)}{$ligne.date|date_fr:'d/m/Y'|escape}{/if}</td>
+            <td>{if isset($ligne.date)}{$ligne.libelle|escape}{/if}</td>
+            <td><a href="{$admin_url}compta/comptes/journal.php?id={$ligne.compte|escape}">{$ligne.compte|escape}</a></td>
+            <td>{$ligne.compte|get_nom_compte|escape}</td>
+            {if $ligne.montant > 0}
             <td>{$ligne.montant|html_money}</td>
             <td></td>
-        </tr>
-        <tr>
-            <td>{$ligne.compte_credit|escape} - {$ligne.compte_credit|get_nom_compte|escape}</td>
+            {else}
             <td></td>
-            <td>{$ligne.montant|html_money}</td>
+            <td>{$ligne.montant_oppose|html_money}</td>
+            {/if}
         </tr>
     {/foreach}
     </tbody>
@@ -36,4 +39,4 @@
 
 <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"}