Kassenverwaltungssystem hinzugefügt #issue/25 #35

Merged
lrsauvette merged 2 commits from issue/25 into develop 2026-07-31 23:11:21 +00:00
Owner
No description provided.
Adds a new 'Kasse' tab to the app for tracking SV income and
expenses, with CRUD, verification, filtering and CSV import/export.

Models
- KassenEintrag: datum, typ (Einnahme/Ausgabe), betrag,
  beschreibung, kategorieId, notiz, zahlungsweg (Bargeld/Bank/
  Lastschrift), belegNummer, verantwortlicher, verifiziert,
  verifiziertAm.
- KassenKategorie: simple bezeichnung-only category with a
  'standard' flag reserved for future predefined entries.

Persistence
- KassenEintragStore: add / update / remove / addAll / replaceAll /
  setVerifiziert plus computed summeEinnahmen / summeAusgaben /
  saldo. Backed by the existing JsonStore.
- KassenKategorieStore: add / update / remove / reorder and
  lookup helpers used by the page and CSV import. Starts empty.

UI
- KassePage: new navigation-bar tab. Toolbar with CSV import /
  export and 'Neuer Eintrag'. Summary row at the top shows
  Einnahmen / Ausgaben / Saldo (red for negative). Filter row
  with Alle / Offen / Verifiziert segments plus a search field.
  Sortable DataTable with Datum, Typ, Beschreibung, Kategorie,
  Betrag columns and per-row actions: verify toggle (green
  verified icon when on), edit, delete (with confirmation).
- KassenEintragDialog: SegmentedButton for typ, fields for
  beschreibung / betrag (numeric, accepts comma) / datum
  picker / kategorie / zahlungsweg / beleg-nr / verantwortlicher
  / notiz. Validation for betrag > 0 and non-empty beschreibung.
- KassenKategorienPage: ReorderableListView with rename-on-tap
  and delete with confirmation. Empty-state hint when no
  categories exist.
- New 'Kassen-Kategorien verwalten' card in the Einstellungen
  page → Stammdaten section.

CSV import / export
- CsvIoKasse with the standard header:
  datum, typ, betrag, beschreibung, kategorie, notiz,
  zahlungsweg, beleg_nummer, verantwortlicher, verifiziert.
- Comma-quoted fields, German decimal comma supported on
  import, dot decimal on export.
- Header detection requires at least 2 matching column names,
  so a data row whose value happens to equal a header name
  (e.g. 'Kategorie') is not mistaken for a header.
- Import auto-creates missing categories by bezeichnung and
  resolves them to IDs after creation.

Tests (20 new, total 63 passing):
- KassenEintragStore: add/update/remove, addAll vs replaceAll,
  sums, setVerifiziert toggles verifiziertAm, throws on unknown
  id, JsonStore roundtrip preserves type / verified state.
- KassenKategorieStore: empty start, ignore-blank, CRUD,
  case-insensitive findByBezeichnung, reorder + persist,
  bezeichnungFuer fallbacks.
- CsvIoKasse: header order, export-import roundtrip,
  position-based parsing without header, CSV-quoting with
  embedded comma, German decimal comma, empty input,
  toEintrag generates fresh IDs.
The three-cell summary row (Einnahmen/Ausgaben/Saldo) had two
issues:

1. The two 1-px vertical Container dividers were squeezed
   against the Expanded cells, eating horizontal space and
   contributing to the overflow. Replaced with SizedBox
   separators.

2. The inner Row inside _summaryZahl (icon + label) was sized
   to its natural width with no flex fallback, so the label
   'Einnahmen' overflowed when the column got narrower (e.g.
   with the global text scale cranked up). Wrapped the label
   Text in Flexible with overflow ellipsis and softWrap=false.

The amount Text now also lives inside a FittedBox(scaleDown)
so large Saldo values never overflow the available width
either.
lrsauvette merged commit 6b984caf1c into develop 2026-07-31 23:11:21 +00:00
lrsauvette deleted branch issue/25 2026-07-31 23:11:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lrsauvette/sv-helfer!35
No description provided.