Maj
This commit is contained in:
1 parent
337d0c1a2c
commit
d5792fb3e2
3 files changed
+163
-11
No files matched your search
@@ -3346,6 +3346,20 @@ db.exec(`
|
||||
`);
|
||||
db.exec('CREATE INDEX IF NOT EXISTS idx_invpeval_inv ON investissements_pe_valorisations(investissement_pe_id)');
|
||||
|
||||
// Migration : décomposition optionnelle de la valorisation en capital déployé / plus-value
|
||||
// latente (18/09/26, demande Olivier — construire une carte de répartition façon Fundora sur la
|
||||
// fiche détail PE). Capital non déployé n'est JAMAIS stocké : il se déduit à l'affichage/au
|
||||
// calcul (montant_investi du deal − capital_deploye de cette valorisation). Colonnes nullables :
|
||||
// une valorisation peut rester en saisie simple (un seul montant net), sans détail — c'est
|
||||
// d'ailleurs le cas de toutes les valorisations existantes avant cette migration.
|
||||
const invPeValCols = db.prepare('PRAGMA table_info(investissements_pe_valorisations)').all().map(c => c.name);
|
||||
if (!invPeValCols.includes('capital_deploye')) {
|
||||
db.exec('ALTER TABLE investissements_pe_valorisations ADD COLUMN capital_deploye REAL');
|
||||
}
|
||||
if (!invPeValCols.includes('plus_value_latente')) {
|
||||
db.exec('ALTER TABLE investissements_pe_valorisations ADD COLUMN plus_value_latente REAL');
|
||||
}
|
||||
|
||||
// Lien optionnel remboursement → deal PE (17/09/26) : une distribution (retour
|
||||
// de capital, plus-value) perçue sur un deal PE est saisie comme un
|
||||
// remboursement bonus_plateforme/interets_plateforme, comme demandé par
|
||||
|
||||
Reference in new issue
Block a user