Fix: Cash-Startwert zeigt Bestand NACH den Investitionen (kein Doppelzaehlen)
Deploy App / deploy (push) Successful in 56s
Deploy App / deploy (push) Successful in 56s
Investitionen einer Phase (Zusatz-/Neuinvestitionen aus Cash) werden am Phasenanfang abgezogen; der Cash-Startwert bildet das nun ab. Behebt zugleich eine Doppelzaehlung im Startvermoegen (der investierte Betrag stand zuvor sowohl im Cash-Start als auch im Vermoegen). Endwerte unveraendert. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -363,8 +363,10 @@ export function computePlan(plan: PlanInput): PlanComputed {
|
||||
}
|
||||
|
||||
// --- Jahr-fuer-Jahr: indexierte Flows, Cash-Ausgleich, Verzinsung, Ruin ---
|
||||
const cashStart = cashCarryIn;
|
||||
// Investitionen dieser Phase werden am Phasenanfang abgezogen -> der Cash-Startwert
|
||||
// zeigt den Bestand NACH den Investitionen (kein Doppelzaehlen mit dem Vermoegen).
|
||||
let cash = cashCarryIn - (isFirstPhase ? 0 : investmentsFromCash);
|
||||
const cashStart = cash;
|
||||
let cashNegative = cash < 0;
|
||||
let incomeStart = 0;
|
||||
let incomeEnd = 0;
|
||||
|
||||
Reference in New Issue
Block a user