Vererbung Einkommen/Ausgaben + Real/Nominal-Umschalter
Deploy App / deploy (push) Successful in 1m2s
Deploy App / deploy (push) Successful in 1m2s
Punkt 1: Beim Speichern eines Einkommens-/Ausgaben-Basiswerts, der dem fortgeschriebenen Wert der Vorphase entspricht, wird KEIN Override gespeichert. Damit wirken sich Aenderungen in frueheren Phasen automatisch auf Folgephasen aus (live vererbt); nur ein bewusst abweichender Wert bleibt fix. Punkt 2: Anzeige-Umschalter oben links (Nominal / Beide / Real), pro Geraet gespeichert. Alle Betraege in Matrix, Cash-Zeile und Phasenkopf zeigen je nach Wahl den nominalen, realen (kaufkraftbereinigten) oder beide Werte. Engine liefert dazu cumulativeInflationStart (Deflator zu Phasenbeginn) zusaetzlich zum Phasenende. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -62,7 +62,8 @@ export interface PhaseComputed {
|
||||
elements: ElementPhaseComputed[];
|
||||
startWealthNominal: number; // inkl. Cash
|
||||
endWealthNominal: number; // inkl. Cash
|
||||
cumulativeInflationEnd: number;
|
||||
cumulativeInflationStart: number; // Kaufkraft-Deflator zu Phasenbeginn (Startwerte)
|
||||
cumulativeInflationEnd: number; // Kaufkraft-Deflator am Phasenende (Endwerte)
|
||||
endWealthReal: number;
|
||||
}
|
||||
|
||||
@@ -408,6 +409,7 @@ export function computePlan(plan: PlanInput): PlanComputed {
|
||||
const cashEnd = Math.round(cash);
|
||||
const startWealthNominal = Math.round(wealthStart + cashStart);
|
||||
const endWealthNominal = Math.round(wealthEnd + cashEnd);
|
||||
const cumulativeInflationStart = cumulativeInflation;
|
||||
cumulativeInflation = cumulativeInflation * Math.pow(1 + phaseInflation / 100, duration);
|
||||
|
||||
result.push({
|
||||
@@ -433,6 +435,7 @@ export function computePlan(plan: PlanInput): PlanComputed {
|
||||
elements: orderedElements.map((e) => ecById.get(e.id)!),
|
||||
startWealthNominal,
|
||||
endWealthNominal,
|
||||
cumulativeInflationStart,
|
||||
cumulativeInflationEnd: cumulativeInflation,
|
||||
endWealthReal: endWealthNominal / cumulativeInflation,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user