diff --git a/_archives.html b/_archives.html index 9252b3b..4a679bf 100644 --- a/_archives.html +++ b/_archives.html @@ -89,7 +89,8 @@ WHEN true THEN links.id_transaction WHEN false THEN links.id_related END as other_id, - line.credit + line.credit, + MAX(trans2.date) as exit_date FROM acc_transactions AS trans INNER JOIN acc_transactions_links as links ON (trans.id = links.id_transaction OR trans.id = links.id_related) @@ -104,6 +105,7 @@ assign="credit_immo." }} {{:assign solde_immo="%d-%d"|math:$solde_immo:$credit}} + {{:assign exit_date=$exit_date}} {{/select}} {{if $solde_immo == 0}} @@ -150,7 +152,7 @@
| {{$line.trans_date|date_short}} | {{"%f"|math:$line.amort_amount|money_html:false|raw}} | {{$line.trans_label}} - {{if $line.line_label != null}} - {{$line.line_label}}{{/if}} + {{if $line.line_label != null && $line.line_label != $line.trans_label}} - {{$line.line_label}}{{/if}} | {{$line.account_code}} | {{$line.account_label}} | diff --git a/save_amort.html b/save_amort.html index 5a509a8..d34e8c0 100644 --- a/save_amort.html +++ b/save_amort.html @@ -10,6 +10,7 @@ line.id_account as account_id, line.debit as montant, line.id_project as project_id, + line.label as line_label, trans.id as trans_id, trans.label, trans.date, @@ -27,6 +28,9 @@ {{/select}} {{:assign date_debut=$ligne_immo.date}} {{:assign var="amort_label" value="Amortissement %s"|args:$ligne_immo.label}} +{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $ligne_immo.label}} + {{:assign amort_label=$amort_label|cat:" — "|cat:$ligne_immo.line_label}} +{{/if}} {{#load type="immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}} {{:assign duree=$duration}} @@ -289,7 +293,7 @@