Mise en place de la feature de gestion des Frais

This commit is contained in:
ocroguennec committed 2026-09-01 22:16:18 +02:00
1 parent 9ea078302d
commit 0334a63139
27 files changed
+2401 -117

No files matched your search

+27 -1
View File
@@ -462,7 +462,33 @@ export default function DrillCellPanel({
if (c.key === 'interets') v = netMode ? r.interets_nets : r.interets_bruts;
else if (c.key === 'capital') v = r.capital ?? 0;
else v = r.cashback ?? 0;
return <td key={c.key} style={{ ...tdStyle, ...numStyle }}>{fmtEUR(v)}</td>;
// Icône uniquement si le frais réduit réellement ce montant (mode
// 'remboursement', par défaut) — cf. RembFormModal.jsx, Étape 5 bis (01/09/26).
const showFraisIcon = c.key === 'interets' && !netMode && !!r.frais_ttc && (!r.frais_mode_reglement || r.frais_mode_reglement === 'remboursement');
return (
<td key={c.key} style={{ ...tdStyle, ...numStyle }}>
{fmtEUR(v)}
{showFraisIcon && (
<span
className="cell-tooltip"
data-tooltip={
`Intérêts bruts avant frais : ${fmtEUR(r.interets_bruts)}\n` +
`Frais de distribution : -${fmtEUR(r.frais_ttc)}\n` +
`Base après frais (avant prélèvements) : ${fmtEUR(round2(r.interets_bruts - r.frais_ttc))}\n` +
`Prélèv. sociaux : ${fmtEUR(r.prelev_sociaux)}\n` +
`Impôt sur le revenu : ${fmtEUR(r.prelev_forfaitaire)}\n` +
`Montant net reçu : ${fmtEUR(r.net_recu)}`
}
style={{ marginLeft: 5, color: 'var(--warning, #b45309)', verticalAlign: 'middle' }}>
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<circle cx="12" cy="12" r="10" />
<line x1="12" y1="16" x2="12" y2="12" />
<line x1="12" y1="8" x2="12.01" y2="8" />
</svg>
</span>
)}
</td>
);
})}
<td style={{ ...tdStyle, ...numStyle, fontWeight: 600 }}>{fmtEUR(recuRowValue(r))}</td>
</tr>