Merge pull request 'ajustement bulletin web affichage malus negatif' (#677) from jmplace/ScoDoc-Lille:PR96_bulletin_web_malus into sco96

Reviewed-on: https://scodoc.org/git/ScoDoc/ScoDoc/pulls/677
This commit is contained in:
Emmanuel Viennet 2023-07-30 18:36:35 +02:00
commit 868533e30e

View File

@ -376,8 +376,12 @@ class releveBUT extends HTMLElement {
}</div>
<div class=info>`;
if (!dataUE.date_capitalisation) {
output += ` Bonus&nbsp;:&nbsp;${dataUE.bonus || 0}&nbsp;-
Malus&nbsp;:&nbsp;${dataUE.malus || 0}`;
output += ` Bonus&nbsp;:&nbsp;${dataUE.bonus || 0}&nbsp;- `;
if(dataUE.malus >= 0) {
output += `Malus&nbsp;:&nbsp;${dataUE.malus || 0}`;
} else {
output += `Bonus&nbsp;complémentaire&nbsp;:&nbsp;${-dataUE.malus || 0}`;
}
} else {
output += ` le ${this.ISOToDate(
dataUE.date_capitalisation.split("T")[0]