Incorporation modifications branche main
This commit is contained in:
parent
895aa39c3f
commit
bb7e5a2844
20 changed files with 36 additions and 36 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue