feat: add Patentprozesskostenrechner fee calculation engine + API

Pure Go implementation of patent litigation cost calculator with:
- Step-based GKG/RVG fee accumulator across 4 historical schedules (2005/2013/2021/2025 + Aktuell alias)
- Instance multiplier tables for 8 court types (LG, OLG, BGH NZB/Rev, BPatG, BGH Null, DPMA, BPatG Canc)
- Full attorney fee calculation (VG, TG, Erhöhungsgebühr Nr. 1008 VV RVG, Auslagenpauschale)
- Prozesskostensicherheit computation
- UPC fee data (pre-2026 and 2026 schedules with value-based brackets, recoverable costs ceilings)
- Public API: POST /api/fees/calculate, GET /api/fees/schedules (no auth required)
- 22 unit tests covering all calculation paths

Fixes 3 Excel bugs:
- Bug 1: Prozesskostensicherheit VAT formula (subtract → add)
- Bug 2: Security for costs uses GKG base for court fee, not RVG
- Bug 3: Expert fees included in BPatG instance total
This commit is contained in:
m
2026-03-31 17:43:17 +02:00
parent d4092acc33
commit 850f3a62c8
6 changed files with 1247 additions and 0 deletions

View File

@@ -82,6 +82,12 @@ func New(db *sqlx.DB, authMW *auth.Middleware, cfg *config.Config, calDAVSvc *se
billingH := handlers.NewBillingRateHandler(billingRateSvc)
templateH := handlers.NewTemplateHandler(templateSvc, caseSvc, partySvc, deadlineSvc, tenantSvc)
// Fee calculator (public — no auth required, pure computation)
feeCalc := services.NewFeeCalculator()
feeCalcH := handlers.NewFeeCalculatorHandler(feeCalc)
mux.HandleFunc("POST /api/fees/calculate", feeCalcH.Calculate)
mux.HandleFunc("GET /api/fees/schedules", feeCalcH.Schedules)
// Public routes
mux.HandleFunc("GET /health", handleHealth(db))