chore: Marketing-Agentur v3 — 35k/mo in 2028 for channel launch
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m1s
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 29s
CI / test-python-voice (push) Successful in 27s
CI / test-bqas (push) Successful in 28s

This commit is contained in:
Benjamin Admin
2026-04-23 09:53:45 +02:00
parent 362df8f766
commit d7d77769ff

View File

@@ -4,22 +4,18 @@ import { computeFinanzplan } from '@/lib/finanzplan/engine'
export async function POST() {
const BASE = (await pool.query("SELECT id FROM fp_scenarios WHERE is_default=true LIMIT 1")).rows[0]?.id
const results: string[] = []
// Increase Marketing-Agentur further to burn ~400k more over 2026-2028
const agentur: Record<string,number> = {}
for (let m = 8; m <= 12; m++) agentur[`m${m}`] = 5000 // 2026: 5k/mo (+2k)
for (let m = 13; m <= 24; m++) agentur[`m${m}`] = 10000 // 2027: 10k/mo (+5k)
for (let m = 25; m <= 36; m++) agentur[`m${m}`] = 20000 // 2028: 20k/mo (+8k)
for (let m = 37; m <= 48; m++) agentur[`m${m}`] = 20000 // 2029: 20k/mo
for (let m = 49; m <= 60; m++) agentur[`m${m}`] = 25000 // 2030: 25k/mo
for (let m = 8; m <= 12; m++) agentur[`m${m}`] = 5000
for (let m = 13; m <= 24; m++) agentur[`m${m}`] = 12000
for (let m = 25; m <= 36; m++) agentur[`m${m}`] = 35000
for (let m = 37; m <= 48; m++) agentur[`m${m}`] = 20000
for (let m = 49; m <= 60; m++) agentur[`m${m}`] = 25000
await pool.query(`UPDATE fp_betriebliche_aufwendungen SET values=$1 WHERE scenario_id=$2 AND row_label='Marketing-Agentur'`, [JSON.stringify(agentur), BASE])
results.push('Marketing-Agentur v2')
const r = await computeFinanzplan(pool, BASE)
const { rows: liq } = await pool.query(`SELECT (values->>'m24')::numeric as dec27, (values->>'m36')::numeric as dec28, (values->>'m48')::numeric as dec29, (values->>'m60')::numeric as dec30 FROM fp_liquiditaet WHERE scenario_id=$1 AND row_label='LIQUIDITÄT'`, [BASE])
results.push(`Liq: Dec27=${liq[0]?.dec27}, Dec28=${liq[0]?.dec28}, Dec29=${liq[0]?.dec29}, Dec30=${liq[0]?.dec30}`)
const { rows: liq } = await pool.query(`SELECT (values->>'m24')::numeric as dec27, (values->>'m36')::numeric as dec28, (values->>'m60')::numeric as dec30 FROM fp_liquiditaet WHERE scenario_id=$1 AND row_label='LIQUIDITÄT'`, [BASE])
return NextResponse.json({ ok: true, results })
return NextResponse.json({ ok: true, dec27: liq[0]?.dec27, dec28: liq[0]?.dec28, dec30: liq[0]?.dec30 })
}