feat(pitch-deck): formula engine + tooltips for betriebliche Aufwendungen
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m27s
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 36s
CI / test-python-voice (push) Successful in 36s
CI / test-bqas (push) Successful in 34s
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m27s
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 36s
CI / test-python-voice (push) Successful in 36s
CI / test-bqas (push) Successful in 34s
Engine formulas added: - Berufsgenossenschaft (F): 2.77% of total brutto payroll (VBG IT rate) - Internet/Mobilfunk (F): Headcount × 50 EUR/Mon - Allgemeine Marketingkosten (F): 10% of monthly revenue UI: Hover tooltips on all (F) and computed rows showing the formula. SUMME matcher updated for renamed "SUMME Betriebliche Aufwendungen". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -237,6 +237,7 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
|
||||
{ label: 'KFZ-Versicherung (F)', perUnit: 500, source: hcWithoutFounders },
|
||||
{ label: 'Reisekosten (F)', perUnit: 100, source: headcount },
|
||||
{ label: 'Bewirtungskosten (F)', perUnit: 200, source: enterpriseKunden },
|
||||
{ label: 'Internet/Mobilfunk (F)', perUnit: 50, source: headcount },
|
||||
]
|
||||
|
||||
for (const fr of formulaRows) {
|
||||
@@ -251,6 +252,28 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
|
||||
}
|
||||
}
|
||||
|
||||
// Berufsgenossenschaft: 2.77% of total brutto payroll
|
||||
const bgRow = betrieb.find(r => r.row_label.includes('Berufsgenossenschaft'))
|
||||
if (bgRow) {
|
||||
const computed = emptyMonthly()
|
||||
for (let m = 1; 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])
|
||||
bgRow.values = computed
|
||||
}
|
||||
|
||||
// Allgemeine Marketingkosten: 10% of revenue
|
||||
const marketingRow = betrieb.find(r => r.row_label.includes('Allgemeine Marketingkosten'))
|
||||
if (marketingRow) {
|
||||
const computed = emptyMonthly()
|
||||
for (let m = 1; 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])
|
||||
marketingRow.values = computed
|
||||
}
|
||||
|
||||
// Serverkosten: Bestandskunden * 100 + 500 Basis
|
||||
const totalKunden = emptyMonthly()
|
||||
for (const row of kundenRows.rows) {
|
||||
|
||||
Reference in New Issue
Block a user