From 846a651008f0bebb53cd42502fe4dfc215288b8c Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Fri, 19 Dec 2025 11:35:25 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20pr=C3=A9sentation=20montant?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _archives.html | 14 +++++++------- _immobilisations.html | 12 ++++++------ _immobilisations_autres.html | 2 +- _nav.html | 4 ++-- _unfinished.html | 8 ++++---- amortization.html | 12 ++++++------ balance_sheet_exit.html | 6 +++--- compute_exit_data.html | 12 ++++++------ ignore.html | 2 +- other_amortizations.html | 2 +- scripts.js | 6 ++---- style.css | 5 +++-- write_exit.html | 34 +++++++++++++++++----------------- 13 files changed, 59 insertions(+), 60 deletions(-) diff --git a/_archives.html b/_archives.html index 717e710..791db91 100644 --- a/_archives.html +++ b/_archives.html @@ -82,7 +82,7 @@ {{$trans_date|date_short}} {{$exit_date|date_short}} {{$trans_label}} - {{"%f"|math:$debit|money:false}} + {{"%f"|math:$debit|money_html:false|raw}} {{$account_code}} {{$account_label}} {{$project_label}} @@ -124,7 +124,7 @@ Total du compte {{$code}} - {{$value|money}} + {{$value|money_html:false|raw}} @@ -135,8 +135,8 @@ - Total des immobilisations - {{$total_immo|money}} + Total des immobilisations + {{$total_immo|money_html:false|raw}} @@ -153,7 +153,7 @@ Cessions du compte {{$code}} - {{$value|money}} + {{$value|money_html:false|raw}} @@ -164,8 +164,8 @@ - Total des cessions - {{$total_cessions|money}} + Total des cessions + {{$total_cessions|money_html:false|raw}} diff --git a/_immobilisations.html b/_immobilisations.html index d27239d..16500eb 100644 --- a/_immobilisations.html +++ b/_immobilisations.html @@ -157,10 +157,10 @@ #{{$trans_id}} {{$trans_date|date_short}} {{$trans_label}} - {{$debit|money}} + {{$debit|money_html:false|raw}} {{if $duration != null}}{{$duration}}{{/if}} - {{$amort_amount|money|or:"0,00"}} - {{"%d-%d"|math:$debit:$amort_amount|money|or:"0,00"}} + {{$amort_amount|money_html:false|raw}} + {{"%d-%d"|math:$debit:$amort_amount|money_html:false|raw}} {{$account_code}} {{if ! $exist_amort}} @@ -194,7 +194,7 @@ Total du compte {{$code}} - {{$value|money}} + {{$value|money_html:false|raw}} @@ -205,8 +205,8 @@ - Total des immobilisations - {{$total_immo|money}} + Total des immobilisations + {{$total_immo|money_html|raw}} diff --git a/_immobilisations_autres.html b/_immobilisations_autres.html index 41a547f..e0b9bcc 100644 --- a/_immobilisations_autres.html +++ b/_immobilisations_autres.html @@ -126,7 +126,7 @@ #{{$trans_id}} {{$trans_date|date_short}} {{$trans_label}} - {{"%f"|math:$debit|money:false}} + {{"%f"|math:$debit|money_html:false|raw}} {{$account_code}} {{$account_label}} diff --git a/_nav.html b/_nav.html index 979bbb4..b04310b 100644 --- a/_nav.html +++ b/_nav.html @@ -26,11 +26,11 @@ {{if $subsubcurrent == "amortization"}} {{elseif $subsubcurrent == "balance_exit"}} {{/if}} diff --git a/_unfinished.html b/_unfinished.html index 9bef1b7..d556277 100644 --- a/_unfinished.html +++ b/_unfinished.html @@ -134,7 +134,7 @@ #{{$trans_id}} {{$trans_date|date_short}} {{$trans_label}} - {{"%f"|math:$debit|money:false}} + {{"%f"|math:$debit|money_html:false|raw}} {{$account_code}} {{$account_label}} @@ -156,7 +156,7 @@ Total du compte {{$code}} - {{$value|money}} + {{$value|money_html|raw}} @@ -166,8 +166,8 @@ - Total des immobilisations - {{$total_immo|money}} + Total des immobilisations + {{$total_immo|money_html|raw}} diff --git a/amortization.html b/amortization.html index fc6aa7c..df3fb57 100644 --- a/amortization.html +++ b/amortization.html @@ -184,7 +184,7 @@
Immobilisation
#{{$ligne_immo.trans_id}} {{$ligne_immo.label}}
Montant
-
{{"%f"|math:$ligne_immo.montant|money_currency}}
+
{{"%f"|math:$ligne_immo.montant|money_currency_html:false|raw}}
Début d'amortissement
{{$date_debut|date_short}}
{{if $duree != null}} @@ -193,13 +193,13 @@ {{/if}} {{if $valeur_residuelle > 0}}
Montant des amortissements
-
{{"%d-%d"|math:$ligne_immo.montant:$valeur_residuelle|money_currency:false}}
+
{{"%d-%d"|math:$ligne_immo.montant:$valeur_residuelle|money_currency_html:false|raw}}
Valeur nette comptable
-
{{$valeur_residuelle|money_currency}}
+
{{$valeur_residuelle|money_currency_html:false|raw}}
{{/if}} {{if $duree != null && $valeur_residuelle > 0}}
Annuité estimée
-
{{"%f/%d"|math:$ligne_immo.montant:$duree|money_currency}}
+
{{"%f/%d"|math:$ligne_immo.montant:$duree|money_currency_html:false|raw}}
{{/if}} @@ -229,8 +229,8 @@ #{{$line.amort_trans_id}} {{$line.amort_date|date_short}} - {{"%f"|math:$line.amort_amount|money}} - {{"%f"|math:$solde|money:false}} + {{"%f"|math:$line.amort_amount|money_html:false|raw}} + {{"%f"|math:$solde|money_html:false|raw}} {{if $line.amort_label == null}} {{$line.trans_label}} diff --git a/balance_sheet_exit.html b/balance_sheet_exit.html index 3d19e35..d75fe21 100644 --- a/balance_sheet_exit.html +++ b/balance_sheet_exit.html @@ -185,7 +185,7 @@ Données de l'imobilisation
Montant
-
{{$ligne_immo.montant|money_currency:false}}
+
{{$ligne_immo.montant|money_currency_html:false|raw}}
Date d'acquisition
{{$ligne_immo.date_achat|date_short}}
{{if $info_immo.date != null && $info_immo.date != $ligne_immo.date_achat}} @@ -197,9 +197,9 @@
{{$info_immo.duration}} ans
{{/if}}
Montant des amortissements
-
{{$amort_amount|money_currency:false}} (à la date de début de l'exercice)
+
{{$amort_amount|money_currency_html:false|raw}} (à la date de début de l'exercice)
Valeur nette résiduelle
-
{{$valeur_nette|money_currency:false}} (à la date de début de l'exercice)
+
{{$valeur_nette|money_currency_html:false|raw}} (à la date de début de l'exercice)
{{if $valeur_nette > 0}} diff --git a/compute_exit_data.html b/compute_exit_data.html index f046e77..e991034 100644 --- a/compute_exit_data.html +++ b/compute_exit_data.html @@ -62,7 +62,7 @@ Données de l'imobilisation
Montant
-
{{$ligne_immo.montant|money_currency:false}}
+
{{$ligne_immo.montant|money_currency_html:false|raw}}
Date d'acquisition
{{$ligne_immo.date_achat|date_short}}
{{if $_GET.date_mes != $ligne_immo.date_achat|strtotime}} @@ -74,18 +74,18 @@
{{$_GET.duree_amort}} ans
{{/if}}
Montant des amortissements
-
{{$_GET.amort_amount|money_currency:false}} (à la date de début de l'exercice)
+
{{$_GET.amort_amount|money_currency_html:false|raw}} (à la date de début de l'exercice)
Valeur nette résiduelle
-
{{$valeur_nette|money_currency:false}} (à la date de début de l'exercice)
+
{{$valeur_nette|money_currency_html:false|raw}} (à la date de début de l'exercice)
Date de sortie
{{$_GET.exit_date|date:"d/m/Y"}}
{{if $amort_comp > 0}}
Amortissement complémentaire
-
{{$amort_comp|money_currency:false}} (jusqu'à la date de sortie)
+
{{$amort_comp|money_currency_html:false|raw}} (jusqu'à la date de sortie)
Total des amortissements
-
{{"%f+%f"|math:$_GET.amort_amount:$amort_comp|money_currency:false}} (à la date de sortie)
+
{{"%f+%f"|math:$_GET.amort_amount:$amort_comp|money_currency_html:false|raw}} (à la date de sortie)
Valeur nette résiduelle
-
{{"%f-%f"|math:$valeur_nette:$amort_comp|money_currency:false}} (à la date de sortie)
+
{{"%f-%f"|math:$valeur_nette:$amort_comp|money_currency_html:false|raw}} (à la date de sortie)
{{/if}}
diff --git a/ignore.html b/ignore.html index a8d4ec6..dc55e63 100644 --- a/ignore.html +++ b/ignore.html @@ -64,7 +64,7 @@
Écriture
#{{$ligne_immo.trans_id}} {{$ligne_immo.label}}
Montant
-
{{"%f"|math:$ligne_immo.amount|money_currency}}
+
{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}
diff --git a/other_amortizations.html b/other_amortizations.html index a3758d9..6ce187e 100644 --- a/other_amortizations.html +++ b/other_amortizations.html @@ -99,7 +99,7 @@ #{{$line.t_id}} {{$line.t_date|date_short}} - {{"%f"|math:$line.amort_amount|money}} + {{"%f"|math:$line.amort_amount|money_html:false|raw}} {{if $line.l_label == null}} {{$line.t_label}} {{else}} diff --git a/scripts.js b/scripts.js index 17a738f..0d6a9b5 100644 --- a/scripts.js +++ b/scripts.js @@ -80,7 +80,7 @@ function setDateEnd(id_exercices, id_date, id_years) { // renvoyer la valeur numérique d'un montant formaté en € function getNumber(text) { - return Number(text.replace(/ /g, '').replace(/,/, '.').replace(/€/, '')); + return Number(text.replace(/[ \xa0]/g, '').replace(/,/, '.').replace(/€/, '')); } // calculer le montant d'un amortissement @@ -196,11 +196,9 @@ function addAmountLine(amount, label, parent) { col_compte.classList.add("label"); const col_montant = document.createElement("td"); col_montant.classList.add("money"); - const span = document.createElement("strong"); const montant = document.createTextNode(new Intl.NumberFormat("fr-FR", { style: "currency", currency: "EUR" }).format(amount / 100., )); - span.appendChild(montant); col_compte.appendChild(document.createTextNode(label)); - col_montant.appendChild(span); + col_montant.appendChild(montant); node.appendChild(col_compte); node.appendChild(col_montant); parent.appendChild(node); diff --git a/style.css b/style.css index f7bd24e..d6ab989 100644 --- a/style.css +++ b/style.css @@ -35,11 +35,12 @@ h2[class="aide"], h3[class="aide"] { } .informations dl.describe > dt { - flex: 0 0 10rem; + flex: 0 0 15rem; margin-right: 0; } .informations dl.describe > dd { + flex: 0 0 calc(100% - 20rem); margin-right: 0; } @@ -53,7 +54,7 @@ fieldset.shortFormLeft div.informations { border-radius: .5em; } -span.strong { +.strong { font-weight: bold; } diff --git a/write_exit.html b/write_exit.html index 1e5d067..290ad26 100644 --- a/write_exit.html +++ b/write_exit.html @@ -324,7 +324,7 @@ Données de l'imobilisation
Montant
-
{{$ligne_immo.montant|money_currency:false}}
+
{{$ligne_immo.montant|money_currency_html:false|raw}}
Date d'acquisition
{{$ligne_immo.date_achat|date_short}}
{{if $_GET.date_mes != $ligne_immo.date_achat|strtotime}} @@ -336,28 +336,28 @@
{{$_GET.duree_amort}} ans
{{/if}}
Montant des amortissements
-
{{$_GET.amort_amount|money_currency:false}} (à la date de début de l'exercice)
+
{{$_GET.amort_amount|money_currency_html:false|raw}} (à la date de début de l'exercice)
Valeur nette résiduelle
-
{{$valeur_nette|money_currency:false}} (à la date de début de l'exercice)
+
{{$valeur_nette|money_currency_html:false|raw}} (à la date de début de l'exercice)
Date de sortie
{{$_GET.exit_date|date:"d/m/Y"}}
{{if $amort_comp > 0}} {{:assign valeur_nette="%f-%f"|math:$valeur_nette:$amort_comp}}
Amortissement complémentaire
-
{{$amort_comp|money_currency:false}} (jusqu'à la date de sortie)
+
{{$amort_comp|money_currency_html:false|raw}} (jusqu'à la date de sortie)
Total des amortissements
-
{{"%f+%f"|math:$_GET.amort_amount:$amort_comp|money_currency:false}} (à la date de sortie)
+
{{"%f+%f"|math:$_GET.amort_amount:$amort_comp|money_currency_html:false|raw}} (à la date de sortie)
Valeur nette résiduelle
-
{{$valeur_nette|money_currency:false}} (à la date de sortie)
+
{{$valeur_nette|money_currency_html:false|raw}} (à la date de sortie)
{{/if}} {{if $montant_cession == 0}} {{if $amort_except > 0}}
Amortissement exceptionnel
-
{{$amort_except|money_currency:false}}
+
{{$amort_except|money_currency_html:false|raw}}
{{/if}} {{else}}
Montant de la cession
-
{{$montant_cession|money_currency:false}}
+
{{$montant_cession|money_currency_html:false|raw}}
{{/if}}
@@ -389,7 +389,7 @@ default=$comp_account }} - {{$amort_comp|money_currency:false}} + {{$amort_comp|money_currency_html:false|raw}} @@ -402,7 +402,7 @@ }} - {{$amort_comp|money_currency:false}} + {{$amort_comp|money_currency_html:false|raw}} @@ -433,7 +433,7 @@ default=$except_account }} - {{$amort_except|money_currency:false}} + {{$amort_except|money_currency_html:false|raw}} @@ -446,7 +446,7 @@ }} - {{$amort_except|money_currency:false}} + {{$amort_except|money_currency_html:false|raw}} @@ -476,7 +476,7 @@ {{else}} {{:assign montant="%f+%f"|math:$_GET.amort_amount:$amort_comp}} {{/if}} - {{$montant|money_currency:false}} + {{$montant|money_currency_html:false|raw}} {{if $montant_cession > 0 && $valeur_nette > 0}} @@ -489,7 +489,7 @@ default=$vnc_account }} - {{$valeur_nette|money_currency:false}} + {{$valeur_nette|money_currency_html:false|raw}} {{/if}} @@ -503,7 +503,7 @@ }} - {{$ligne_immo.montant|money_currency:false}} + {{$ligne_immo.montant|money_currency_html:false|raw}} @@ -528,7 +528,7 @@ default=$creance_account }} - {{$montant_cession|money_currency:false}} + {{$montant_cession|money_currency_html:false|raw}} @@ -541,7 +541,7 @@ }} - {{$montant_cession|money_currency:false}} + {{$montant_cession|money_currency_html:false|raw}}