From 8295cfa09d6434f7c2ce07b14a645ceda0f6d465 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Wed, 18 Mar 2026 09:34:26 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20affichage=20libell=C3=A9=20?= =?UTF-8?q?et=20correction=20oubli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _archives.html | 6 ++++-- _immobilisations.html | 8 +++++--- _immobilisations_autres.html | 2 +- amortization.html | 9 ++++----- other_amortizations.html | 4 ++-- save_amort.html | 6 +++++- 6 files changed, 21 insertions(+), 14 deletions(-) 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 @@ #{{$trans_id}} {{$trans_date|date_short}} {{$exit_date|date_short}} - {{$trans_label}}{{if $line_label != null}} — {{$line_label}}{{/if}} + {{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$line_label}}{{/if}} {{"%f"|math:$montant_immo|money_html:false|raw}} {{$account_code}} {{$account_label}} diff --git a/_immobilisations.html b/_immobilisations.html index 3bc7f54..92a6022 100644 --- a/_immobilisations.html +++ b/_immobilisations.html @@ -1,6 +1,6 @@ {{* -*- brindille -*- *}} -{{* Liste des immobilisations en cours ou amorties *}} +{{* Liste des immobilisations en cours d'amortissement ou amorties *}}
@@ -100,6 +100,7 @@ }} {{:assign montant_immo="%d-%d"|math:$montant_immo:$credit}} {{/select}} + {{* Immobilisation soldée ? *}} {{if $montant_immo == 0}} {{:continue}} {{/if}} @@ -107,7 +108,7 @@ {{* voir s'il existe des écritures d'amortissement associées *}} {{:assign amort_lines=null}} {{#select - (l_amort.credit) as amount, + l_amort.credit as amount, CASE links.id_related = t_immo.id WHEN true THEN links.id_transaction WHEN false THEN links.id_related @@ -124,6 +125,7 @@ assign="amort_lines." }} {{/select}} + {{:assign amort_amount=0}} {{#foreach from=$amort_lines item="elem"}} {{* voir s'il existe un doc associé à l'écriture d'amortissement *}} @@ -160,7 +162,7 @@ #{{$immo_trans_id}} {{$trans_date|date_short}} - {{$trans_label}}{{if $line_label != null}} — {{$line_label}}{{/if}} + {{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$line_label}}{{/if}} {{$montant_immo|money_html:false|raw}} {{if $duration != null}}{{$duration}}{{/if}} {{$amort_amount|money_html:false|raw}} diff --git a/_immobilisations_autres.html b/_immobilisations_autres.html index 5308366..05849bb 100644 --- a/_immobilisations_autres.html +++ b/_immobilisations_autres.html @@ -153,7 +153,7 @@ #{{$trans_id}} {{$trans_date|date_short}} - {{$trans_label}}{{if $line_label != null}} — {{$line_label}}{{/if}} + {{$trans_label}}{{if $line_label != null && $line_label != $trans_label}} — {{$line_label}}{{/if}} {{"%f"|math:$debit|money_html:false|raw}} {{$account_code}} {{$account_label}} diff --git a/amortization.html b/amortization.html index 86da589..4edf953 100644 --- a/amortization.html +++ b/amortization.html @@ -242,7 +242,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$ligne_immo.label}}{{if $ligne_immo.line_label != null}} — {{$ligne_immo.line_label}}{{/if}}
+
#{{$ligne_immo.trans_id}} {{$ligne_immo.label}}{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $ligne_immo.label}} — {{$ligne_immo.line_label}}{{/if}}
Montant
{{"%f"|math:$ligne_immo.montant|money_currency_html:false|raw}}
Début d'amortissement
@@ -292,10 +292,9 @@ {{"%f"|math:$line.amort_amount|money_html:false|raw}} {{"%f"|math:$solde|money_html:false|raw}} - {{if $line.amort_label == null}} - {{$line.trans_label}} - {{else}} - {{$line.amort_label}} + {{$line.trans_label}} + {{if $line.amort_label != null && $line.amort_label != $line.trans_label}} + — {{$line.amort_label}} {{/if}} {{$line.account_code}} diff --git a/other_amortizations.html b/other_amortizations.html index 84ac835..7018b2e 100644 --- a/other_amortizations.html +++ b/other_amortizations.html @@ -122,7 +122,7 @@ {{if $autres_amortissements != null}}
-

Immobilisation « {{$ligne_immo.label}}{{if $ligne_immo.line_label != null}} — {{$ligne_immo.line_label}}{{/if}} »

+

Immobilisation « {{$ligne_immo.label}}{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $ligne_immo.label}} — {{$ligne_immo.line_label}}{{/if}} »

@@ -144,7 +144,7 @@ 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 @@
{{:input type="select" default=$selected_year name="id_year" label="Exercice" required=true default_empty="— Faire un choix —" options=$open_years}} {{:input type="date" name="date_amort" label="Date" required=true default=$date_amort|date_short}} - {{:input type="text" name="designation" label="Libellé" required=true default=$amort_label}} + {{:input type="text" name="designation" label="Libellé" required=true default=$amort_label size="50"}} {{:input type="money" name="montant" label="Montant" required=true default=$montant_amort}} {{:input type="list"
{{$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}}