54 Commits

Author SHA256 Message Date
8eee62ee19 fix: Datenschutz-Scrub in Tests/Kommentaren + Spec-Nachtrag Vorschlags-Algorithmus
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 21:59:29 +02:00
aff8e9b28d fix: Bestandsabgleich per Token-Match und Volatilitaets-Hinweis fuer Vorschlaege
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 21:46:10 +02:00
220d1fc802 fix: hinweis-Betrag im Vorschlag deutsch formatiert
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 21:28:15 +02:00
bf3f56118e feat: Vorschlaege mit Rhythmus, Start und Hinweis
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 21:26:48 +02:00
28d1267f0c feat: Vorschlags-Algorithmus v2 (Rhythmen, letzter Betrag, Aktiv-Check, Merge)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 21:20:04 +02:00
4431640eb2 feat: Kategorien-Verwaltung auf der Admin-Seite
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 14:17:48 +02:00
b21d7b9839 feat: Eintrags-Formular mit Paar-Layout und Gesperrt-Kennzeichnung
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 14:06:32 +02:00
f03249bff1 feat: eigene Szenarien-Seite /szenarien
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 13:59:03 +02:00
cb44194daf feat: Szenario-Eintraege als eine editierbare Tabelle
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 12:51:04 +02:00
4843f2e130 feat: PATCH-Endpunkte fuer Szenario-Modifikatoren und -Einmalzahlungen
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 12:43:01 +02:00
033c41f449 feat: Szenario-GUI mit Ende-Modifikator und Einmalzahlungen je Szenario
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 11:59:42 +02:00
13795fce25 feat: API fuer Szenario-Ende-Modifikator und szenario-eigene Einmalzahlungen
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 11:52:15 +02:00
5519037688 feat: Engine+Schema fuer Szenario-Ende und szenario-eigene Einmalzahlungen
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 11:46:52 +02:00
aa1884c31e feat: Inline-Bearbeiten fuer Fixposten, Einmalposten, Kredite und Szenario-Kopf
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 11:42:04 +02:00
cbcf2e0439 feat: Start/Ende fuer Fixposten in der GUI + Datumsvalidierung
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 11:35:32 +02:00
805cb4d852 feat: Betragseingabe mit Komma (data-type=amount in json-form)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 11:30:58 +02:00
fe0e1b5e93 feat: deutsche Betragsanzeige (eur-Filter) und deutsche GUI-Labels
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 11:23:26 +02:00
f5fa3e45e8 feat: Admin-Seite mit Passwortaenderung und Regel-Neuanwendung
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 08:24:33 +02:00
1b888307e9 fix: DKB-Empfaenger/Zweck-Split per CSV-Ground-Truth, Vergleichswerkzeug
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 22:08:37 +02:00
7a0f71aa8c feat: Salden-Seite mit Stichtag und Monatsuebersicht
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 21:53:23 +02:00
ea4858c4de feat: CSV-Import ueber bestehende Pipeline mit dreiwertiger Saldo-Pruefung
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 21:45:53 +02:00
e2d713e960 feat: CSV-Parser fuer DKB/VR/HVB-Kontoumsatz-Exporte
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 21:34:48 +02:00
f6a53b7e56 feat: Konto-Saldo-Anker mit ankerbasierter Saldenrechnung
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 21:25:04 +02:00
18b738738b test: UX-Regressionstests fuer Vorschlaege-Fieldset und Import-Button-Matrix
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 17:18:03 +02:00
06392c0fec fix: tolerante GUI-Filter, sichtbare Bedienelemente, fixierte Navigation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 17:09:35 +02:00
e7855a7bda feat: Import-Rollback fuer bestaetigte Auszuege (v0.3.0)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 16:40:56 +02:00
d71c22adce feat: Buchungs-Pagination, Inbox-Scan-Button, Grafana-Direktansteuerung, UI-Feinschliff
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 16:18:54 +02:00
e40442b73b feat: Hilfe-Seite mit Gebrauchsanleitung
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 15:02:19 +02:00
82f278ca00 feat: Versionsanzeige (VERSION-Datei, Footer, /api/version, Image-Tag)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 14:57:49 +02:00
36d3e4fc59 feat: Konten umbenennbar, Betrag-Spalte mit Euro im Kopf
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 14:50:39 +02:00
f27eda88f4 fix: Parser-Noise-Filter, Sammelstopp am Schlusssaldo, Audit-Werkzeug
Alle drei Bank-Parser gegen die realen Fixtures gehaertet:

- DKB/VR/HVB: Sammlung endet am Schlusssaldo (break), damit Summen,
  Rechnungsabschluss und Hinweisseiten nicht mehr in die letzte Buchung
  rutschen.
- Generische, rein strukturelle Noise-Filter fuer wiederkehrende
  Seitenfuss-/Kopfbloecke und Blattwechsel-Reste (keine Kontodaten hart
  codiert); Kopf-/Hinweisbloecke werden als Sequenz uebersprungen.
- VR: Rekonstruktion harter Zeilenumbrueche im Verwendungszweck unter
  konservativen Schutzbedingungen (nur purpose, nicht counterparty).
- Neue Noise- und expected-Value-Tests; expected_*.json gitignored.
- Audit-Werkzeug scripts/parser_audit.py ergaenzt (nur lokale Nutzung).

Transaktionszahlen und Saldo-Differenzen unveraendert; max. Laenge des
Verwendungszwecks je Bank deutlich unter 300 Zeichen.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 14:46:32 +02:00
917797bb16 fix: Duplikat-Recheck beim Confirm nur statement-uebergreifend
Zwei identische Buchungen im selben Auszug teilen sich den dedup_hash. Beim
Confirm markierte die zuerst bestaetigte Buchung ihren Zwilling (autoflush +
Clash-Select) als Duplikat und uebersprang ihn, wodurch der vom Preview
gepruefte Saldo zerstoert wurde. Clash-Query um statement_id != tx.statement_id
erweitert: der Re-Check schuetzt nur noch statement-uebergreifend. Test: Auszug
mit zwei identischen Buchungen -> beide werden bestaetigt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 20:16:08 +02:00
cf9282c716 fix: Final-Review-Findings (GUI-Login, FK-Kaskaden, Validierung, Duplikat-Recheck, Views)
F1: GUI-Login-Hash gegen $-Korruption gehaertet. .env-Werte einfach-gequotet
    geschrieben + Sanity-Check nach Sourcing. Zusaetzlich systemd-Ebene:
    podman escapt $->$$ in Environment=, systemd 252 kollabiert das nicht ->
    sed-Post-Processing der Unit-Dateien. Live-.env: GUI-Passwort rotiert.
F2: Explizite Dependent-Deletes gegen FK-500 (delete_scenario/loan), 409 bei
    bestaetigtem Import-Delete. Test-Engine erzwingt PRAGMA foreign_keys=ON.
F3: Enum/Range-Validierung (Literal + Field ge/le) fuer Recurring, Loan,
    Modifier inkl. PATCH-Pfade.
F4: Confirm nur fuer draft-Statements (sonst 409) + Dedup-Re-Check gegen
    bestaetigte Buchungen vor dem Promoten.
F5: v_balance_history/v_balance_total addieren pro Konto den opening_balance
    des fruehesten bestaetigten Statements (approved deviation vom Plan-SQL).
F6: patch_scenario Namenskollision -> 409; create_transaction unbekanntes
    Konto -> 404 (statt 500).
F7: Generierte systemd-Unit-Dateien chmod 600 (enthalten Env-Secrets).
F8: Globaler htmx:responseError-Handler in base.html.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 20:11:31 +02:00
df6615c8f7 fix: Fehler-Feedback Kreditzuordnung, robustes PDF-Fehlerhandling
Kreditzuordnung im Szenario prueft jetzt response.ok, zeigt bei Fehlschlag
eine deutsche Meldung und macht die Checkbox-Aenderung rueckgaengig statt
stillschweigend neu zu laden. process_pdf faengt zusaetzlich zu ParserError
auch unerwartete Parser-Exceptions (z.B. pdfminer bei strukturell kaputten
PDFs) ab und legt dafuer ein sauberes error-Statement an statt eines
unbehandelten 500; die Datei bleibt dabei im Posteingang.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 19:14:43 +02:00
afbbcbe9a5 feat: Import-Seite mit Drag-and-Drop und Planungs-Seite
Ersetzt die Platzhalter-Routen aus Task 12 durch echte GUI-Seiten: /import
mit Drop-Zone (Fetch-Upload), gepollter Importliste (Status-Badges,
aufklappbarer Vorschau samt Saldo-/Duplikat-Anzeige, Uebernehmen/Verwerfen)
und /planung mit den vier Abschnitten Fixposten (inkl. Vorschlaege),
Einmalposten, Kredite (Tilgungsplan-Aufklapper) und Szenarien
(Kredit-Zuordnung, Modifikatoren, Durchrechnen mit Ergebnisanzeige).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 19:05:58 +02:00
a6009c47e3 feat: Web-GUI Basis, Uebersicht, Buchungsliste
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 18:45:54 +02:00
e8ea948b38 test: Vorschlagslogik suggest_recurring abgedeckt
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 18:38:52 +02:00
b0cb4883ea feat: Planungs- und Szenario-API mit Projektion und Vorschlaegen
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 18:33:25 +02:00
8ca563cec1 fix: Upload-Sanitizing, atomare Import-Reihenfolge, idempotentes UNBEKANNT-Konto
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 18:28:15 +02:00
19d870cf20 feat: Import-API mit Vorschau, Saldo-Pruefung und Duplikat-Schutz
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 18:21:28 +02:00
0576b396f1 fix: PATCH-Buchung ohne Feld laesst Kategorie unveraendert, 404 bei unbekannter Kategorie
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 18:16:52 +02:00
320abd6542 feat: CRUD-API Konten/Buchungen/Kategorien/Regeln
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 18:11:56 +02:00
193bbc450c fix: konstante Zeit fuer API-Key-Vergleich, Auth-Tests erweitert
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 18:07:20 +02:00
a10f4d0b57 feat: FastAPI-App mit API-Key- und Session-Auth
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 18:03:24 +02:00
101ee01af1 feat: PDF-Parser VR/HVB/DKB mit Registry und Fixture-Tests
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 17:58:33 +02:00
78d94a583b fix: NBSP-Betraege und ParserError bei ungueltigem Datum
- parse_german_amount: Fix non-breaking space (U+00A0) handling in second replace call
  was: .replace(" ", "").replace(" ", "") → now: .replace(" ", "").replace("\xa0", "")
- parse_german_date: Catch ValueError from invalid calendar dates (e.g., 31.02.2026)
  and raise ParserError with "Ungültiges Datum" message instead
- Add test for non-breaking space amount parsing
- Add test for invalid date error handling with pytest.raises

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 17:34:39 +02:00
d91bb2e331 feat: Parser-Basis, Bank-Erkennung, Saldo-/Duplikat-Pruefung
- ParsedTransaction und ParsedStatement Datenklassen
- parse_german_amount(): German format number parsing (1.234,56 -> Decimal)
- parse_german_date(): DD.MM.YYYY date parsing with optional year
- detect_bank(): Recognize VR/HVB/DKB from text markers
- balance_difference(): Validate statement balance consistency
- dedup_hash(): SHA256-based transaction deduplication

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 17:30:10 +02:00
877cba4964 test: Absolute-Modifier und Stichtag-Semantik der Projektion
Ergänzte Tests für Lückenschluss:
1. test_absolute_modifier_reduces_outflow: Absolute Modifier reduziert Ausgaben (-200 - 50 = -150)
2. test_absolute_modifier_clamps_to_zero: Absolute Modifier klemmt auf 0 (nie Vorzeichenflip: -200 + 300 = 0)
3. test_cashflow_on_start_date_excluded: Cashflows am start_date werden ausgeschlossen (Teil des Startsaldos)

Alle 18 Tests grün (15 existierend + 3 neu).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 17:27:41 +02:00
020f41e9f2 feat: Szenario-Engine (Projektion, Modifikatoren, Zahlungsstrom)
Implementiert Task 5 mit TDD-Ansatz: projection.py mit Projection-Klasse
und project()-Funktion für Cashflow-Simulation; scenario.py mit PlainRecurring,
PlainPlanned, PlainModifier Dataclasses und build_cashflows() für Szenarien-Zahlungsströme
mit Modifier-Support (remove, percent, absolute). Alle 15 Tests grün.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 17:22:36 +02:00
d41db2e10d test: Clamping-Tests Schaltjahr und Quartalsrhythmus
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 17:20:19 +02:00