From bb7e5a2844e6042b06c456b1bd04c3f407a83f5c Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Mon, 26 Oct 2026 12:11:32 +0100 Subject: [PATCH] Incorporation modifications branche main --- _archives.html | 2 +- _immobilisations.html | 2 +- _immobilisations_autres.html | 8 ++++---- _unfinished.html | 4 ++-- add_infos.html | 2 +- amortization.html | 6 +++--- attach_amort.html | 2 +- attach_credit.html | 2 +- exit_step1.html | 4 ++-- exit_step2.html | 4 ++-- exit_step3.html | 4 ++-- exit_step4.html | 4 ++-- ignore.html | 2 +- link_immo.html | 4 ++-- list_cessions.html | 4 ++-- list_exit.html | 4 ++-- modify_infos.html | 2 +- other_amortizations.html | 4 ++-- save_amort.html | 2 +- scripts.js | 6 +++--- 20 files changed, 36 insertions(+), 36 deletions(-) diff --git a/_archives.html b/_archives.html index 8d408a7..92e10af 100644 --- a/_archives.html +++ b/_archives.html @@ -147,7 +147,7 @@ {{:assign label_immo=$label_immo|cat:" — "|cat:$line_label}} {{/if}} - #{{$trans_id}} + {{$trans_id}} {{$date_mes|date_short}} {{$exit_date|date_short}} {{$label_immo}} diff --git a/_immobilisations.html b/_immobilisations.html index 51f9f1c..8788cac 100644 --- a/_immobilisations.html +++ b/_immobilisations.html @@ -122,7 +122,7 @@ {{:assign var="sommes_immo.%s"|args:$account_code value="%d+%d"|math:$montant:$montant_immo}} - #{{$immo_trans_id}} + {{$immo_trans_id}} {{$immo_date|date_short}} {{$label_immo}} {{$montant_immo|money_html:false|raw}} diff --git a/_immobilisations_autres.html b/_immobilisations_autres.html index d80acee..7e43c0c 100644 --- a/_immobilisations_autres.html +++ b/_immobilisations_autres.html @@ -21,7 +21,7 @@ {{else}} {{:assign unhide=1}} {{/if}} - {{:assign var="user_hides.unhide_other" value=$unhide"}} + {{:assign var="user_hides.unhide_other" value=$unhide}} {{:assign var="saved_hides.%s"|args:$logged_user.id value=$user_hides}} {{:save key="config" hides=$saved_hides}} {{/if}} @@ -29,7 +29,7 @@ {{:assign checked="checked"}} {{/if}} -{{* vérifier l'existence de la table du module *}} +{{* vérifier l'existence de la table du module' *}} {{if $module.table != null}} {{:assign columns="$$.status as status, SUM($$.amount) as amount,"}} {{:assign table_join="LEFT JOIN !table AS info ON $$.line = line.id"}} @@ -42,7 +42,7 @@ {{* lister les immobilisations non prises en charge par le module - ou dont le montant n'a pas été totalement affecté + ou dont le montant n'a pas été totalement affecté' *}} {{:assign account_condition="("}} {{#foreach from=$module.config.prefixes item="code"}} @@ -137,7 +137,7 @@ {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.trans_id_year}} {{:assign reste="%d-%d"|math:$line.debit:$line.amount}} - #{{$line.immo_trans_id}} + {{$line.immo_trans_id}} {{$line.immo_line_id}} {{$trans_date|date_short}} {{$line.trans_label}}{{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}} diff --git a/_unfinished.html b/_unfinished.html index 4c12d4d..3c9a1c4 100644 --- a/_unfinished.html +++ b/_unfinished.html @@ -21,7 +21,7 @@ {{else}} {{:assign unhide=1}} {{/if}} - {{:assign var="user_hides.unhide_unfinished" value=$unhide"}} + {{:assign var="user_hides.unhide_unfinished" value=$unhide}} {{:assign var="saved_hides.%s"|args:$logged_user.id value=$user_hides}} {{:save key="config" hides=$saved_hides}} {{/if}} @@ -177,7 +177,7 @@ {{:input type="checkbox" name="selected[]" value=$trans_id}} - #{{$trans_id}} + {{$trans_id}} {{$trans_date|date_short}} {{$trans_label}} {{"%f"|math:$debit|money_html:false|raw}} diff --git a/add_infos.html b/add_infos.html index 9a45878..d2a4874 100644 --- a/add_infos.html +++ b/add_infos.html @@ -178,7 +178,7 @@
Immobilisation
- #{{$ligne_immo.immo_trans_id}} {{$immo_label}} + {{$ligne_immo.immo_trans_id}} {{$immo_label}}
Montant
{{"%f"|math:$ligne_immo.montant|money_currency_html:false|raw}}
diff --git a/amortization.html b/amortization.html index 02963f7..c765722 100644 --- a/amortization.html +++ b/amortization.html @@ -140,7 +140,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$label_immo}}
+
{{$ligne_immo.trans_id}} {{$label_immo}}
Compte d'immobilisation
{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}
Début d'amortissement
@@ -200,7 +200,7 @@ {{#foreach from=$linked_immos item="line"}} {{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}} - #{{$line.trans_id}} + {{$line.trans_id}} {{$line.date|date_short}} {{$line.label}} {{"%f"|math:$line.amount|money_currency_html:false|raw}} @@ -260,7 +260,7 @@ {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}} {{:assign solde="%f-%d"|math:$solde:$line.amount}} - #{{$line.trans_id}} + {{$line.trans_id}} {{$line.date|date_short}} {{$line.trans_label}} diff --git a/attach_amort.html b/attach_amort.html index eaf3600..3d95188 100644 --- a/attach_amort.html +++ b/attach_amort.html @@ -149,7 +149,7 @@
Immobilisation
{{$label_immo}}
Amortissement
-
#{{$amort_line.trans_id}} {{$amort_label}}
+
{{$amort_line.trans_id}} {{$amort_label}}
Montant de l'écriture d'amortissement
{{$amort_line.amount|money_currency_html:false|raw}}
{{if $montant_affecte > 0}} diff --git a/attach_credit.html b/attach_credit.html index 1d3db8e..b1adb99 100644 --- a/attach_credit.html +++ b/attach_credit.html @@ -125,7 +125,7 @@
Immobilisation
{{$label_immo}}
Écriture au crédit du compte d'immobilisation
-
#{{$credit_line.trans_id}} {{$credit_line.trans_label}}{{if $credit_line.line_label != null && $credit_line.line_label != $credit_line.trans_label}} — {{$credit_line.line_label}}{{/if}}
+
{{$credit_line.trans_id}} {{$credit_line.trans_label}}{{if $credit_line.line_label != null && $credit_line.line_label != $credit_line.trans_label}} — {{$credit_line.line_label}}{{/if}}
Montant de l'écriture
{{$credit_line.amount|money_currency_html:false|raw}}
Montant déjà affecté
diff --git a/exit_step1.html b/exit_step1.html index de1e539..8e68c35 100644 --- a/exit_step1.html +++ b/exit_step1.html @@ -152,7 +152,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$label_immo}}
+
{{$ligne_immo.trans_id}} {{$label_immo}}
Compte d'immobilisation
{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}
Montant de l'immobilisation
@@ -199,7 +199,7 @@ {{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}} {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}} - #{{$line.trans_id}} + {{$line.trans_id}} {{$line.date|date_short}} {{$line.label}} {{"%f"|math:$line.amount|money_currency_html:false|raw}} diff --git a/exit_step2.html b/exit_step2.html index 462d4a3..e3ed8a5 100644 --- a/exit_step2.html +++ b/exit_step2.html @@ -117,7 +117,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$label_immo}}
+
{{$ligne_immo.trans_id}} {{$label_immo}}
Compte d'immobilisation
{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}
Montant de l'immobilisation
@@ -167,7 +167,7 @@ {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}} {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}} - #{{$line.trans_id}} + {{$line.trans_id}} {{$line.date|date_short}} {{if $line.line_label != null}} diff --git a/exit_step3.html b/exit_step3.html index d0498c8..c001827 100644 --- a/exit_step3.html +++ b/exit_step3.html @@ -124,7 +124,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$label_immo}}
+
{{$ligne_immo.trans_id}} {{$label_immo}}
Compte d'immobilisation
{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}
Montant de l'immobilisation
@@ -178,7 +178,7 @@ {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}} {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}} - #{{$line.trans_id}} + {{$line.trans_id}} {{$line.date|date_short}} {{if $line.line_label != null}} diff --git a/exit_step4.html b/exit_step4.html index 62b6c7b..d3df512 100644 --- a/exit_step4.html +++ b/exit_step4.html @@ -247,7 +247,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$label_immo}}
+
{{$ligne_immo.trans_id}} {{$label_immo}}
Compte d'immobilisation
{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}
Montant de l'immobilisation
@@ -332,7 +332,7 @@ - #{{$exit_line.trans_id}} + {{$exit_line.trans_id}} {{$exit_line.date|date_short}} {{if $exit_line.line_label != null}} diff --git a/ignore.html b/ignore.html index a721759..9dc3577 100644 --- a/ignore.html +++ b/ignore.html @@ -63,7 +63,7 @@
Écriture
-
#{{$ligne_immo.trans_id}} {{$ligne_immo.label}}
+
{{$ligne_immo.trans_id}} {{$ligne_immo.label}}
Montant
{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}
diff --git a/link_immo.html b/link_immo.html index c2295a4..adddc11 100644 --- a/link_immo.html +++ b/link_immo.html @@ -122,7 +122,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$label_immo}}
+
{{$ligne_immo.trans_id}} {{$label_immo}}
Montant
{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}
Date de l'immobilisation
@@ -148,7 +148,7 @@ {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.credit_trans_id}} {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.credit_year}} - #{{$line.credit_trans_id}} + {{$line.credit_trans_id}} {{$line.trans_date|date_short}} {{"%f"|math:$line.credit_amount|money_html:false|raw}} {{$line.trans_label}} diff --git a/list_cessions.html b/list_cessions.html index db85b97..ef4b96d 100644 --- a/list_cessions.html +++ b/list_cessions.html @@ -77,7 +77,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$label_immo}}
+
{{$ligne_immo.trans_id}} {{$label_immo}}
Montant
{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}
Date de l'immobilisation
@@ -105,7 +105,7 @@ {{:assign cession_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}} {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}} - #{{$line.trans_id}} + {{$line.trans_id}} {{$line.date|date_short}} {{if $line.line_label != null}} diff --git a/list_exit.html b/list_exit.html index 7678294..bcc39e0 100644 --- a/list_exit.html +++ b/list_exit.html @@ -75,7 +75,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$label_immo}}
+
{{$ligne_immo.trans_id}} {{$label_immo}}
Montant
{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}
Date de l'immobilisation
@@ -102,7 +102,7 @@ {{:assign exit_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}} {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}} - #{{$line.trans_id}} + {{$line.trans_id}} {{$line.date|date_short}} {{$line.trans_label}} {{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}} diff --git a/modify_infos.html b/modify_infos.html index c65194a..2e056e5 100644 --- a/modify_infos.html +++ b/modify_infos.html @@ -129,7 +129,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$immo_label}}
+
{{$ligne_immo.trans_id}} {{$immo_label}}
Compte d'immobilisation
{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}
Montant
diff --git a/other_amortizations.html b/other_amortizations.html index e3d8f9e..f43cbf1 100644 --- a/other_amortizations.html +++ b/other_amortizations.html @@ -76,7 +76,7 @@
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$label_immo}}
+
{{$ligne_immo.trans_id}} {{$label_immo}}
Montant
{{"%f"|math:$montant_immo|money_currency_html:false|raw}}
Début d'amortissement
@@ -102,7 +102,7 @@ {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}} {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}} - #{{$line.trans_id}} + {{$line.trans_id}} {{$line.trans_date|date_short}} {{if $line.line_label != null}} diff --git a/save_amort.html b/save_amort.html index 468de09..0226760 100644 --- a/save_amort.html +++ b/save_amort.html @@ -229,7 +229,7 @@ {{:assign var=date_amort value=$years.0.end_date}} {{:include file="_calcul_dates.html" date_debut=$date_debut date_fin=$date_amort keep="nbjours"}} {{* montant de l'amortissement *}} - {{:assign montant_amort="%f/%f/365*%d"|math:$ligne_immo.amount:$info_immo.duration:$nbjours|intval}} + {{:assign montant_amort="round(%f/%f/365*%d,2)"|math:$ligne_immo.amount:$info_immo.duration:$nbjours|intval}} {{:assign montant_amort="min(%f, %d-%d)"|math:$montant_amort:$ligne_immo.amount:$total_amort}} {{/if}} diff --git a/scripts.js b/scripts.js index 3def0ba..644ae39 100644 --- a/scripts.js +++ b/scripts.js @@ -93,7 +93,7 @@ function getNumber(text) { // @param date de fin // @result montant de l'amortissement function computeAmort(montant_immo, duree_immo, somme_amort, date_debut, date_fin) { - const nbjours = 1 + (date_fin - date_debut) / (60*60*24); + const nbjours = Math.round(1 + Math.abs((date_fin - date_debut)) / (60*60*24)); return Math.round(Math.min(montant_immo / duree_immo / 365 * nbjours, montant_immo - somme_amort)); } @@ -131,7 +131,7 @@ function displayAmort(id_immo, id_duree, id_amort, id_years, id_exercices, id_mo const somme_amort = Number(document.getElementById(id_amort).value); const montant_amort = computeAmort(montant_immo, duree_immo, somme_amort, date_debut, date_fin); case_montant.value = montant_amort/100; - case_montant.innerText = montant_amort; + case_montant.innerText = montant_amort/100; } function setSelectorYear(button_names, f_years_selector) @@ -249,7 +249,7 @@ function computeTotal(id_total, id_url) { total[code] = getNumber(money.innerText) * 100; } total_general += getNumber(money.innerText) * 100; - const number = line.querySelector('.num a').innerText.slice(1); + const number = line.querySelector('.num a').innerText; transactions.push(number); } }