diff --git a/frontend/src/pages/InvestissementDetail.jsx b/frontend/src/pages/InvestissementDetail.jsx index f6bb65f..f57fa3d 100644 --- a/frontend/src/pages/InvestissementDetail.jsx +++ b/frontend/src/pages/InvestissementDetail.jsx @@ -648,6 +648,7 @@ export default function InvestissementDetail() { const remb = inv.remboursements || []; const simul = inv.simul || []; + const todayStr = today(); const historique = inv.historique || []; const reinvs = inv.reinvestissements || []; // Capital total = montant initial + réinvestissements @@ -1227,6 +1228,7 @@ export default function InvestissementDetail() { ? matchedAll.reduce((sum, r) => sum + (r.net_recu || 0), 0) : matchedAll.reduce((sum, r) => sum + (r.capital || 0) + (r.cashback || 0) + (r.interets_bruts || 0), 0)) : null; + const isPast = s.date_prevue < todayStr; const interetsDiffers = isPaid && Math.abs(interetsReels - interets) > 0.01; const totalDiffers = isPaid && Math.abs(totalRecu - s.total_prevu) > 0.01; @@ -1248,6 +1250,11 @@ export default function InvestissementDetail() { {fmtEUR(interets)} {fmtEUR(interetsReels)} + ) : (isPast && !isPaid) ? ( + + {fmtEUR(interets)} + 0,00 € + ) : fmtEUR(interets)}