From ab7b945705aa83eb674c02d3836704e32fa5ac38 Mon Sep 17 00:00:00 2001 From: Olivier Date: Tue, 16 Jun 2026 21:03:15 +0200 Subject: [PATCH] fix --- frontend/src/pages/InvestissementDetail.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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)} @@ -1256,6 +1263,11 @@ export default function InvestissementDetail() { {fmtEUR(s.total_prevu)} {fmtEUR(totalRecu)} + ) : (isPast && !isPaid) ? ( + + {fmtEUR(s.total_prevu)} + 0,00 € + ) : ( {fmtEUR(s.total_prevu)} )}