diff --git a/web/modules/custom/figli_compta_ledger/js/home.js b/web/modules/custom/figli_compta_ledger/js/home.js index 3737785..1de4d55 100644 --- a/web/modules/custom/figli_compta_ledger/js/home.js +++ b/web/modules/custom/figli_compta_ledger/js/home.js @@ -234,6 +234,13 @@ formatEur(v) { return v === null || v === undefined ? '' : EUR.format(v); }, + // jj/mm/aa -- shorter than the API's ISO yyyy-mm-dd, saves column + // width in a table already packed with 8 compte columns. + formatDate(iso) { + if (!iso) return ''; + const [y, m, d] = iso.split('-'); + return d + '/' + m + '/' + y.slice(2); + }, typeLabel(t) { return TYPE_LABELS[t] || t; }, diff --git a/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig b/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig index a515a6e..f6cdbec 100644 --- a/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig +++ b/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig @@ -66,6 +66,7 @@
| Date | Client | Type | @@ -74,7 +75,6 @@Montant TTC | {{ c }} | Écart | -{{ item.label }} ({{ item.count }} lignes) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ item.date }} | -{{ item.client || '—' }} | -{{ typeLabel(item.type) }} | -- {{ item.libelle }} - {{ reconciliationByEntree.get(item.id).count }} sortie{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }} liée{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }} · reste {{ formatEur(reconciliationByEntree.get(item.id).resteAVerser) }} · sur-versé {{ formatEur(reconciliationByEntree.get(item.id).surVerse) }} - | -{{ formatEur(item.montant_ht) }} | -{{ formatEur(item.montant_ttc) }} | -{{ item.parCompte[c] !== undefined ? formatEur(item.parCompte[c]) : '' }} | -{{ item.hasError ? formatEur(item.ecart) : '' }} | + | {{ formatDate(item.date) }} | +{{ item.client || '—' }} | +{{ typeLabel(item.type) }} | ++ {{ item.libelle }} + {{ reconciliationByEntree.get(item.id).count }} sortie{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }} liée{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }} · reste {{ formatEur(reconciliationByEntree.get(item.id).resteAVerser) }} · sur-versé {{ formatEur(reconciliationByEntree.get(item.id).surVerse) }} + | +{{ formatEur(item.montant_ht) }} | +{{ formatEur(item.montant_ttc) }} | +{{ item.parCompte[c] !== undefined ? formatEur(item.parCompte[c]) : '' }} | +{{ item.hasError ? formatEur(item.ecart) : '' }} |
| Solde (créditeur / débiteur) — {{ filteredRows.length }} lignes filtrées | {{ formatEur(footerTotals.montant_ht) }} | {{ formatEur(footerTotals.montant_ttc) }} | {{ formatEur(footerTotals.parCompte[c]) }} | {{ formatEur(footerTotals.ecart) }} | -||||||||||||