fix(pitch-deck): no costs before founding month (FOUNDING_MONTH)
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m8s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 32s
CI / test-python-voice (push) Successful in 32s
CI / test-bqas (push) Successful in 31s
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m8s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 32s
CI / test-python-voice (push) Successful in 32s
CI / test-bqas (push) Successful in 31s
Engine: All formula-based rows (F) now start at FOUNDING_MONTH (m8), not m1. Affects: Fortbildung, Fahrzeug, KFZ, Reise, Bewirtung, Internet, BG, Marketing, Serverkosten, Gewerbesteuer. DB: All manual (M) betriebliche rows zeroed for m1-m7 across all 6 scenarios. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -244,7 +244,7 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
|
||||
const row = betrieb.find(r => r.row_label === fr.label)
|
||||
if (row) {
|
||||
const computed = emptyMonthly()
|
||||
for (let m = 1; m <= MONTHS; m++) {
|
||||
for (let m = FOUNDING_MONTH; m <= MONTHS; m++) {
|
||||
computed[`m${m}`] = Math.round((fr.source[`m${m}`] || 0) * fr.perUnit)
|
||||
}
|
||||
await pool.query('UPDATE fp_betriebliche_aufwendungen SET values = $1 WHERE id = $2', [JSON.stringify(computed), row.id])
|
||||
@@ -256,7 +256,7 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
|
||||
const bgRow = betrieb.find(r => r.row_label.includes('Berufsgenossenschaft'))
|
||||
if (bgRow) {
|
||||
const computed = emptyMonthly()
|
||||
for (let m = 1; m <= MONTHS; m++) {
|
||||
for (let m = FOUNDING_MONTH; m <= MONTHS; m++) {
|
||||
computed[`m${m}`] = Math.round((totalBrutto[`m${m}`] || 0) * 0.0277)
|
||||
}
|
||||
await pool.query('UPDATE fp_betriebliche_aufwendungen SET values = $1 WHERE id = $2', [JSON.stringify(computed), bgRow.id])
|
||||
@@ -267,7 +267,7 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
|
||||
const marketingRow = betrieb.find(r => r.row_label.includes('Allgemeine Marketingkosten'))
|
||||
if (marketingRow) {
|
||||
const computed = emptyMonthly()
|
||||
for (let m = 1; m <= MONTHS; m++) {
|
||||
for (let m = FOUNDING_MONTH; m <= MONTHS; m++) {
|
||||
computed[`m${m}`] = Math.round((totalRevenue[`m${m}`] || 0) * 0.10)
|
||||
}
|
||||
await pool.query('UPDATE fp_betriebliche_aufwendungen SET values = $1 WHERE id = $2', [JSON.stringify(computed), marketingRow.id])
|
||||
@@ -284,7 +284,7 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
|
||||
const serverRow = betrieb.find(r => r.row_label === 'Serverkosten Cloud (F)' || r.row_label === 'Serverkosten (Cloud)')
|
||||
if (serverRow) {
|
||||
const computed = emptyMonthly()
|
||||
for (let m = 1; m <= MONTHS; m++) {
|
||||
for (let m = FOUNDING_MONTH; m <= MONTHS; m++) {
|
||||
computed[`m${m}`] = Math.round((totalKunden[`m${m}`] || 0) * 50 + 300)
|
||||
}
|
||||
await pool.query('UPDATE fp_betriebliche_aufwendungen SET values = $1 WHERE id = $2', [JSON.stringify(computed), serverRow.id])
|
||||
@@ -313,7 +313,7 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
|
||||
!r.is_sum_row && !r.row_label.includes('Summe') && !r.row_label.includes('SUMME')
|
||||
)
|
||||
const computed = emptyMonthly()
|
||||
for (let m = 1; m <= MONTHS; m++) {
|
||||
for (let m = FOUNDING_MONTH; m <= MONTHS; m++) {
|
||||
const rev = totalRevenue[`m${m}`] || 0
|
||||
const mat = totalMaterial[`m${m}`] || 0
|
||||
const pers = totalPersonal[`m${m}`] || 0
|
||||
|
||||
Reference in New Issue
Block a user