From f5331183603da4ce931309be85f9a25b14b2c6e0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Fri, 9 May 2025 09:38:09 +0200 Subject: [PATCH] calcul amortissement sur 365 jours --- balance_sheet_exit.html | 2 +- write_exit.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/balance_sheet_exit.html b/balance_sheet_exit.html index d2cdb03..7a72861 100644 --- a/balance_sheet_exit.html +++ b/balance_sheet_exit.html @@ -234,7 +234,7 @@ function computeAmort() { duree_amort = Number(elem.innerText.replace(/ .*/, '')); } const annuite = montantImmo / duree_amort; - const amort_comp = annuite / 360 * nbDays; + const amort_comp = annuite / 365 * nbDays; console.log("durée amort = " + duree_amort + ", annuité=" + annuite + ", amort comp = " + amort_comp); } /* diff --git a/write_exit.html b/write_exit.html index 0ef62eb..21549ee 100644 --- a/write_exit.html +++ b/write_exit.html @@ -78,7 +78,7 @@ }} {{:debug nbjours=$nbjours}} {{:assign annuite="%f/%f"|math:$ligne_immo.debit:$duree_amort}} - {{:assign amort_comp="round(%f/360*%f, 0)"|math:$annuite:$nbjours}} + {{:assign amort_comp="round(%f/365*%f, 0)"|math:$annuite:$nbjours}} {{:assign amort_comp="min(%f, %f)"|math:$valeur_nette:$amort_comp}} {{if $_GET.cession == null}}