From f4db83591fce915eb07492145cb9e0e4f7d45a24 Mon Sep 17 00:00:00 2001 From: Olivier Date: Tue, 16 Jun 2026 20:08:22 +0200 Subject: [PATCH] =?UTF-8?q?am=C3=A9lioration=20de=20l'affichage=20des=20pr?= =?UTF-8?q?ojections?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/InvestissementDetail.jsx | 35 +++++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/InvestissementDetail.jsx b/frontend/src/pages/InvestissementDetail.jsx index c90f41d..11fb918 100644 --- a/frontend/src/pages/InvestissementDetail.jsx +++ b/frontend/src/pages/InvestissementDetail.jsx @@ -1199,6 +1199,19 @@ export default function InvestissementDetail() { const interets = netMode ? (s.interets_prevus || 0) * (1 - reduction) : (s.interets_prevus || 0); + + // Montants réels pour comparaison + const interetsReels = isPaid + ? (netMode ? (matched.interets_nets || 0) : (matched.interets_bruts || 0)) + : null; + const totalRecu = isPaid + ? (netMode + ? (matched.net_recu || 0) + : (matched.capital || 0) + (matched.cashback || 0) + (matched.interets_bruts || 0)) + : null; + const interetsDiffers = isPaid && Math.abs(interetsReels - interets) > 0.01; + const totalDiffers = isPaid && Math.abs(totalRecu - s.total_prevu) > 0.01; + return ( {s.numero_echeance} {fmtDate(s.date_prevue)} {fmtEUR(s.capital_prevu)} - {fmtEUR(interets)} - {fmtEUR(s.total_prevu)} + + {interetsDiffers ? ( + + {fmtEUR(interets)} + {fmtEUR(interetsReels)} + + ) : fmtEUR(interets)} + + + {totalDiffers ? ( + + {fmtEUR(s.total_prevu)} + {fmtEUR(totalRecu)} + + ) : ( + {fmtEUR(s.total_prevu)} + )} + {isPaid ? @@ -2390,4 +2419,4 @@ export default function InvestissementDetail() { /> ); -} +} \ No newline at end of file