diff --git a/web/modules/custom/figli_compta_ledger/js/home.js b/web/modules/custom/figli_compta_ledger/js/home.js index e3ba48e..ea0f6ff 100644 --- a/web/modules/custom/figli_compta_ledger/js/home.js +++ b/web/modules/custom/figli_compta_ledger/js/home.js @@ -471,6 +471,15 @@ const sorties = pool.filter((r) => r.type !== 'entree' && r.entreeLieeIds.some((id) => entreeIds.has(id))); return [...entrees, ...sorties]; }, + // Which comptes actually carry a value somewhere in the drill-down + // group -- unlike the main table (always all 8, so columns line up + // across every row/year), this modal's group is usually 2-4 rows + // touching only 1-2 comptes, so the other 6+ empty columns are pure + // clutter. + modalComptes() { + if (!this.filterEntreeGroup) return []; + return this.allComptes.filter((c) => this.filterEntreeGroup.some((r) => r.parCompte[c] !== undefined)); + }, filteredRows() { return this.rows.filter((r) => { if (this.filterCompte && r.parCompte[this.filterCompte] === undefined) return false; 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 bc90ca2..d8c5a57 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 @@ -196,7 +196,7 @@
-

Entrée + sorties liées vérification…

+

Entrées et sorties liées vérification…

@@ -210,7 +210,7 @@ Libellé / Détail Montant HT Montant TTC - {{ c }} + {{ c }} Écart @@ -241,17 +241,17 @@ {{ formatEur(item.montant_ht) }} {{ formatEur(item.montant_ttc) }} - {{ item.parCompte[c] !== undefined ? formatEur(item.parCompte[c]) : '' }} + {{ item.parCompte[c] !== undefined ? formatEur(item.parCompte[c]) : '' }} {{ item.hasError ? formatEur(item.ecart) : '' }} - Solde entrée + sorties liées (créditeur / débiteur) + Solde entrées et sorties liées (créditeur / débiteur) {{ drilldownTotals ? formatEur(drilldownTotals.montant_ht) : '' }} {{ drilldownTotals ? formatEur(drilldownTotals.montant_ttc) : '' }} - {{ drilldownTotals && drilldownTotals.par_compte[c] !== undefined ? formatEur(drilldownTotals.par_compte[c]) : '' }} + {{ drilldownTotals && drilldownTotals.par_compte[c] !== undefined ? formatEur(drilldownTotals.par_compte[c]) : '' }} {{ drilldownTotals ? formatEur(drilldownTotals.ecart) : '' }}