Color and bold Montant HT to distinguish entrées from sorties
Single anchor per row -- Montant TTC and the 8 compte columns stay neutral, so the table doesn't turn into a red/green garland. No 0.5€ threshold like soldeClass (used for aggregate totals): individual lines are often small (a -1.07€ OVH renewal shouldn't read as "neutral"), any nonzero sign gets colored. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -153,6 +153,18 @@ html.gin--dark-mode #figli-home-app {
|
|||||||
color: var(--figli-error);
|
color: var(--figli-error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Single colored + bold anchor per row (Montant HT only) so entrées vs
|
||||||
|
sorties are scannable at a glance -- everything else in the row (TTC,
|
||||||
|
the 8 compte columns) stays neutral, not a red/green garland. */
|
||||||
|
#figli-home-app td.figli-montant-positif {
|
||||||
|
color: var(--figli-positive);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
#figli-home-app td.figli-montant-negatif {
|
||||||
|
color: var(--figli-error);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
/* Error rows: a thin red outline around the row, not a background fill --
|
/* Error rows: a thin red outline around the row, not a background fill --
|
||||||
easier to read, doesn't fight with dark mode. */
|
easier to read, doesn't fight with dark mode. */
|
||||||
#figli-home-app tr.figli-error-row td {
|
#figli-home-app tr.figli-error-row td {
|
||||||
|
|||||||
@@ -249,6 +249,16 @@
|
|||||||
if (v < -0.5) return 'figli-solde-debiteur';
|
if (v < -0.5) return 'figli-solde-debiteur';
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
// Single colored anchor per row (Montant HT only, not every compte
|
||||||
|
// column) so entrées/sorties are scannable at a glance without the
|
||||||
|
// table turning into a red/green garland. No 0.5€ threshold like
|
||||||
|
// soldeClass -- individual lines are often small (e.g. a -1.07€ OVH
|
||||||
|
// renewal), any nonzero sign should read as positive/negative.
|
||||||
|
montantClass(v) {
|
||||||
|
if (v > 0) return 'figli-montant-positif';
|
||||||
|
if (v < 0) return 'figli-montant-negatif';
|
||||||
|
return '';
|
||||||
|
},
|
||||||
openAddForm() {
|
openAddForm() {
|
||||||
Drupal.ajax({
|
Drupal.ajax({
|
||||||
url: '/node/add/ligne_comptable',
|
url: '/node/add/ligne_comptable',
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
@click="toggleEntreeFilter(item.id)"
|
@click="toggleEntreeFilter(item.id)"
|
||||||
>{{ reconciliationByEntree.get(item.id).count }} sortie{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }} liée{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }}<template v-if="reconciliationByEntree.get(item.id).resteAVerser > 0"> · reste {{ formatEur(reconciliationByEntree.get(item.id).resteAVerser) }}</template><template v-if="reconciliationByEntree.get(item.id).surVerse > 0"> · sur-versé {{ formatEur(reconciliationByEntree.get(item.id).surVerse) }}</template></span>
|
>{{ reconciliationByEntree.get(item.id).count }} sortie{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }} liée{{ reconciliationByEntree.get(item.id).count > 1 ? 's' : '' }}<template v-if="reconciliationByEntree.get(item.id).resteAVerser > 0"> · reste {{ formatEur(reconciliationByEntree.get(item.id).resteAVerser) }}</template><template v-if="reconciliationByEntree.get(item.id).surVerse > 0"> · sur-versé {{ formatEur(reconciliationByEntree.get(item.id).surVerse) }}</template></span>
|
||||||
</td>
|
</td>
|
||||||
<td class="amount">{{ formatEur(item.montant_ht) }}</td>
|
<td class="amount" :class="montantClass(item.montant_ht)">{{ formatEur(item.montant_ht) }}</td>
|
||||||
<td class="amount">{{ formatEur(item.montant_ttc) }}</td>
|
<td class="amount">{{ formatEur(item.montant_ttc) }}</td>
|
||||||
<td v-for="c in allComptes" :key="c" class="amount compte-col">{{ item.parCompte[c] !== undefined ? formatEur(item.parCompte[c]) : '' }}</td>
|
<td v-for="c in allComptes" :key="c" class="amount compte-col">{{ item.parCompte[c] !== undefined ? formatEur(item.parCompte[c]) : '' }}</td>
|
||||||
<td class="amount" :class="{'figli-ecart': item.hasError}">{{ item.hasError ? formatEur(item.ecart) : '' }}</td>
|
<td class="amount" :class="{'figli-ecart': item.hasError}">{{ item.hasError ? formatEur(item.ecart) : '' }}</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user