This commit is contained in:
ocroguennec committed 2026-09-18 08:55:38 +02:00
1 parent d5792fb3e2
commit 4cd4cbce71
4 files changed
+79 -12

No files matched your search

+16 -3
View File
@@ -204,6 +204,10 @@ export default function InvestissementPeDetail() {
(hasFraisEntree && form.frais_entree_mode_reglement === 'source' ? fraisEntreeTTC : 0) +
(hasFraisGestion && form.frais_gestion_mode_reglement === 'source' ? fraisGestionTTC : 0);
// Capital réellement disponible à déployer = montant investi net des frais prélevés "à la
// source" — même correctif que InvestissementsPe.jsx::submit (18/09/26, Olivier).
const capitalInvestissable = Math.max(0, Math.round((Number(form.montant_investi) - totalFraisSource) * 100) / 100);
const payload = {
plateforme_id: Number(form.plateforme_id),
investisseur_id: Number(form.investisseur_id) || undefined,
@@ -212,6 +216,7 @@ export default function InvestissementPeDetail() {
date_souscription: form.date_souscription,
duree_mois: form.duree_annees ? Math.round(Number(form.duree_annees) * 12) : undefined,
montant_investi: Number(form.montant_investi),
capital_investissable: capitalInvestissable,
objectif: form.objectif || undefined,
statut: form.statut,
reference: form.reference || undefined,
@@ -250,8 +255,11 @@ export default function InvestissementPeDetail() {
const hasBreakdown = valForm.capital_deploye !== '';
const capitalDeploye = hasBreakdown ? (Number(valForm.capital_deploye) || 0) : undefined;
const plusValueLatente = hasBreakdown ? (Number(valForm.plus_value_latente) || 0) : undefined;
// Capital investissable (net des frais "à la source"), pas le montant investi brut —
// correctif 18/09/26, cf. deal.capital_investissable.
const capitalInvestissable = Number(deal.capital_investissable ?? deal.montant_investi);
const valorisationNette = hasBreakdown
? Math.round((capitalDeploye + plusValueLatente + Math.max(0, Number(deal.montant_investi) - capitalDeploye)) * 100) / 100
? Math.round((capitalDeploye + plusValueLatente + Math.max(0, capitalInvestissable - capitalDeploye)) * 100) / 100
: Number(valForm.valorisation_nette);
await api.post(`/investissements-pe/${id}/valorisations`, {
date_valorisation: valForm.date_valorisation,
@@ -402,7 +410,7 @@ export default function InvestissementPeDetail() {
const valFormCapitalDeploye = valFormHasBreakdown ? (Number(valForm.capital_deploye) || 0) : 0;
const valFormPlusValue = valFormHasBreakdown ? (Number(valForm.plus_value_latente) || 0) : 0;
const valFormCapitalNonDeploye = valFormHasBreakdown
? Math.max(0, Number(deal.montant_investi) - valFormCapitalDeploye) : 0;
? Math.max(0, Number(deal.capital_investissable ?? deal.montant_investi) - valFormCapitalDeploye) : 0;
const valFormComputedNette = valFormHasBreakdown
? Math.round((valFormCapitalDeploye + valFormPlusValue + valFormCapitalNonDeploye) * 100) / 100
: null;
@@ -441,7 +449,12 @@ export default function InvestissementPeDetail() {
<div className="card" style={{ marginBottom: 16 }}>
<div className="dr-kpi-row" style={{ marginBottom: 0 }}>
<div className="kpi"><div className="label">Montant investi</div>
<div style={{ fontSize: '1.2rem', fontWeight: 700, marginTop: 4 }}>{fmtEUR(deal.montant_investi)}</div></div>
<div style={{ fontSize: '1.2rem', fontWeight: 700, marginTop: 4 }}>{fmtEUR(deal.montant_investi)}</div>
{deal.capital_investissable != null && deal.capital_investissable !== deal.montant_investi && (
<div className="text-muted" style={{ fontSize: 11, marginTop: 2 }}>
dont {fmtEUR(deal.capital_investissable)} investissables (après frais à la source)
</div>
)}</div>
<div className="kpi"><div className="label">TVPI</div>
<div style={{ fontSize: '1.2rem', fontWeight: 700, marginTop: 4 }}>{fmtMultiple(deal.tvpi)}</div></div>
<div className="kpi"><div className="label">Distributions cumulées</div>