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
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:
@@ -62,6 +62,7 @@ const FORMULA_TOOLTIPS: Record<string, string> = {
|
|||||||
'Serverkosten Cloud (F)': 'Bestandskunden × 100 EUR + 500 EUR Basis',
|
'Serverkosten Cloud (F)': 'Bestandskunden × 100 EUR + 500 EUR Basis',
|
||||||
'Berufsgenossenschaft (F)': '2,77% der Brutto-Lohnsumme (VBG IT)',
|
'Berufsgenossenschaft (F)': '2,77% der Brutto-Lohnsumme (VBG IT)',
|
||||||
'Allgemeine Marketingkosten (F)': '10% vom Monatsumsatz',
|
'Allgemeine Marketingkosten (F)': '10% vom Monatsumsatz',
|
||||||
|
'Gewerbesteuer (F)': '12,25% vom Gewinn (Messzahl 3,5% × Hebesatz 350%, nur bei Gewinn)',
|
||||||
'Personalkosten': 'Summe aus Tab Personalkosten',
|
'Personalkosten': 'Summe aus Tab Personalkosten',
|
||||||
'Abschreibungen': 'Summe AfA aus Tab Investitionen',
|
'Abschreibungen': 'Summe AfA aus Tab Investitionen',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -304,6 +304,29 @@ export async function computeFinanzplan(pool: Pool, scenarioId: string): Promise
|
|||||||
abrBetrieb.values = totalAfa
|
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
|
// Compute category sums
|
||||||
const categories = ['steuern', 'versicherungen', 'besondere', 'marketing', 'sonstige']
|
const categories = ['steuern', 'versicherungen', 'besondere', 'marketing', 'sonstige']
|
||||||
for (const cat of categories) {
|
for (const cat of categories) {
|
||||||
|
|||||||
Reference in New Issue
Block a user