feat(pitch-deck): milestones update, Serverkosten formula, material/liquidität fixes
Some checks failed
Build pitch-deck / build-push-deploy (push) Successful in 1m38s
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 44s
CI / test-bqas (push) Has been cancelled
CI / test-python-voice (push) Has been cancelled

- Milestones: correct dates + events (DPMA, domains, RAG, EUIPO, GmbH)
- Serverkosten: 2000 base + max(0, customers-10)*250 (first 10 included)
- Materialaufwand: cleared, info placeholder
- 2. Finanzierungsrunde: renamed, sort order fixed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-21 21:24:37 +02:00
parent 80376c90b3
commit 15b6e8614c
5 changed files with 123 additions and 95 deletions

View File

@@ -281,18 +281,23 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
marketingRow.values = computed
}
// Serverkosten: Bestandskunden * 100 + 500 Basis
const totalKunden = emptyMonthly()
// Serverkosten: 2.000 EUR Basis (SysEleven) + 250 EUR pro Bestandskunde
const totalBestandskunden = emptyMonthly()
for (const row of kundenRows.rows) {
for (let m = 1; m <= MONTHS; m++) {
totalKunden[`m${m}`] += row.values?.[`m${m}`] || 0
const rl = (row as { row_label?: string }).row_label || ''
if (rl.includes('Bestandskunden') && !rl.includes('gesamt')) {
for (let m = 1; m <= MONTHS; m++) {
totalBestandskunden[`m${m}`] += row.values?.[`m${m}`] || 0
}
}
}
const serverRow = betrieb.find(r => r.row_label === 'Serverkosten Cloud (F)' || r.row_label === 'Serverkosten (Cloud)')
if (serverRow) {
const computed = emptyMonthly()
for (let m = FOUNDING_MONTH; m <= MONTHS; m++) {
computed[`m${m}`] = Math.round((totalKunden[`m${m}`] || 0) * 50 + 300)
const kunden = totalBestandskunden[`m${m}`] || 0
const extraKunden = Math.max(0, kunden - 10) // first 10 included in base
computed[`m${m}`] = Math.round(extraKunden * 250 + 2000)
}
await pool.query('UPDATE fp_betriebliche_aufwendungen SET values = $1 WHERE id = $2', [JSON.stringify(computed), serverRow.id])
serverRow.values = computed