calcul amortissement sur 365 jours

This commit is contained in:
Jean-Christophe Engel 2025-05-09 09:38:09 +02:00
parent 99aa29a4a1
commit f533118360
2 changed files with 2 additions and 2 deletions

View file

@ -234,7 +234,7 @@ function computeAmort() {
duree_amort = Number(elem.innerText.replace(/ .*/, '')); duree_amort = Number(elem.innerText.replace(/ .*/, ''));
} }
const annuite = montantImmo / duree_amort; 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); console.log("durée amort = " + duree_amort + ", annuité=" + annuite + ", amort comp = " + amort_comp);
} }
/* /*

View file

@ -78,7 +78,7 @@
}} }}
{{:debug nbjours=$nbjours}} {{:debug nbjours=$nbjours}}
{{:assign annuite="%f/%f"|math:$ligne_immo.debit:$duree_amort}} {{: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}} {{:assign amort_comp="min(%f, %f)"|math:$valeur_nette:$amort_comp}}
{{if $_GET.cession == null}} {{if $_GET.cession == null}}