Gutschriften Phase 3a: Firmenstammdaten (Absender) fuer PDF/ZUGFeRD

Neues CompanyProfile-Modell (Einzel-Zeile) + Migration (IF NOT EXISTS):
Firmenname, Anschrift, USt-IdNr, Steuernummer, Handelsregister,
Geschaeftsfuehrer, Kontakt, IBAN/BIC/Bank. Fliesst spaeter in
Gutschrift-PDF + ZUGFeRD-Verkaeuferdaten ein.

Backend: Service (getOrCreate/update mit Feld-Whitelist), Controller,
Routes GET/PUT /api/company-profile (settings:read/update), auditiert.

Frontend: Settings-Seite 'Firmenstammdaten (Absender)'
(/settings/company-profile) mit Firma/Anschrift, Steuer/Register,
Kontakt/Bank. Typ + companyProfileApi + Menue-Eintrag.

Phase 3b (PDF + ZUGFeRD-Erzeugung) folgt darauf auf.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-06 13:19:36 +02:00
co-authored by Claude Opus 4.8
parent 9e38cb32f0
commit 2c705272ea
11 changed files with 279 additions and 1 deletions
@@ -0,0 +1,10 @@
import { Router } from 'express';
import * as companyProfileController from '../controllers/companyProfile.controller.js';
import { authenticate, requirePermission } from '../middleware/auth.js';
const router = Router();
router.get('/', authenticate, requirePermission('settings:read'), companyProfileController.getProfile);
router.put('/', authenticate, requirePermission('settings:update'), companyProfileController.updateProfile);
export default router;