Amélioration présentation montants
This commit is contained in:
parent
aec5a83eef
commit
846a651008
13 changed files with 59 additions and 60 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue