feat(pitch-deck): move COGS to Materialaufwand for correct Gross Margin
Some checks failed
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 31s
CI / test-python-voice (push) Successful in 30s
CI / test-bqas (push) Has been cancelled

- Cloud-Hosting, KI Tools, 3rd Party API → Materialaufwand
- New rows: Datenbank-Hosting, CDN/Storage
- Engine: compute Cloud-Hosting formula in materialaufwand
- Gross Margin now realistic (~82% in 2026)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-22 07:04:22 +02:00
parent c4ad3bc2c4
commit 24e57f558e
4 changed files with 56 additions and 17 deletions

View File

@@ -294,17 +294,18 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
marketingRow.values = computed
}
// Serverkosten: 2.000 EUR Basis (SysEleven) + 250 EUR pro Bestandskunde (first 10 incl.)
const serverRow = betrieb.find(r => r.row_label === 'Serverkosten Cloud (F)' || r.row_label === 'Serverkosten (Cloud)')
if (serverRow) {
// Serverkosten now in Materialaufwand — compute Cloud-Hosting formula there
const matRows = materialRows.rows as FPMaterialaufwand[]
const cloudRow = matRows.find(r => r.row_label.includes('Cloud-Hosting'))
if (cloudRow) {
const computed = emptyMonthly()
for (let m = FOUNDING_MONTH; m <= MONTHS; m++) {
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
await pool.query('UPDATE fp_materialaufwand SET values = $1 WHERE id = $2', [JSON.stringify(computed), cloudRow.id])
cloudRow.values = computed
}
// Update Personalkosten row