feat(pitch-deck): Gewerbesteuer formula + BG/Marketing/Telefon engine formulas + tooltips
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m34s
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 38s
CI / test-python-voice (push) Successful in 39s
CI / test-bqas (push) Successful in 41s

Engine:
- Gewerbesteuer (F): 12.25% of monthly profit (only when positive)
- Berufsgenossenschaft (F): 2.77% of brutto payroll
- Allgemeine Marketingkosten (F): 10% of revenue
- Internet/Mobilfunk (F): Headcount × 50 EUR/Mon

UI: Tooltip for Gewerbesteuer formula added.

DB changes (production):
- Gewerbesteuer: (M) → (F), auto-calculated
- Rechtsanwalt/Datenschutz: new hire Oct 2026, 7500 EUR brutto
- Beratung & Services: new revenue line (5k→30k/Mon)
- Investitionen: Home Office 2500 EUR per new hire
- Marketing Videos moved to marketing category
- Bank → Bank-/Kreditkartengebühren
- Jahresabschluss costs filled (1000-2000 EUR/year)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-18 14:29:38 +02:00
parent dc36e59d17
commit 84a0280c52
2 changed files with 24 additions and 0 deletions

View File

@@ -304,6 +304,29 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
abrBetrieb.values = totalAfa
}
// Gewerbesteuer (F): 12.25% of monthly profit (only when positive)
// Monthly profit = Revenue - Material - Personnel - AfA - other opex (excl. taxes)
const gewStRow = betrieb.find(r => r.row_label.includes('Gewerbesteuer'))
if (gewStRow) {
const nonTaxOpex = betrieb.filter(r =>
r.category !== 'steuern' && r.category !== 'personal' && r.category !== 'abschreibungen' &&
!r.is_sum_row && !r.row_label.includes('Summe') && !r.row_label.includes('SUMME')
)
const computed = emptyMonthly()
for (let m = 1; m <= MONTHS; m++) {
const rev = totalRevenue[`m${m}`] || 0
const mat = totalMaterial[`m${m}`] || 0
const pers = totalPersonal[`m${m}`] || 0
const afa = totalAfa[`m${m}`] || 0
let opex = 0
for (const r of nonTaxOpex) { opex += r.values[`m${m}`] || 0 }
const profit = rev - mat - pers - afa - opex
computed[`m${m}`] = profit > 0 ? Math.round(profit * 0.1225) : 0
}
await pool.query('UPDATE fp_betriebliche_aufwendungen SET values = $1 WHERE id = $2', [JSON.stringify(computed), gewStRow.id])
gewStRow.values = computed
}
// Compute category sums
const categories = ['steuern', 'versicherungen', 'besondere', 'marketing', 'sonstige']
for (const cat of categories) {