BuchungssatzExcelImporter.ktImports Buchungssätze (accounting records / journal entries) from Excel workbooks using the Merlin Excel framework. Each Excel sheet represents one month (sheet name = month number 01–12). Reads 12 columns with validators and resolves referenced entities (Konto, Kost1, Kost2) during import.
| Dependency | Role |
|---|---|
ImportStorage<BuchungssatzDO> | Accumulates imported sheets and elements with validation errors |
KontoDao | Resolves Konto/account numbers to KontoDO entities |
Kost1Dao | Resolves legacy cost center (Kostenstelle 1) codes |
Kost2Dao | Resolves cost center/carrier (Kostenstelle 2) codes |
Cols)| Enum | Header | Aliases | Validator | Target Property |
|---|---|---|---|---|
SATZNR | SatzNr. | Satz-Nr. | NumberValidator (>=1, required, unique) | satznr |
BETRAG | Betrag | — | NumberValidator (required) | betrag |
SH | SH | S/H | OptionsValidator ("S","H", required) | sh |
KONTO | Konto | — | NumberValidator (required) | konto |
GEGENKONTO | Gegenkonto | — | Validator (required) | gegenKonto |
KOST1 | Alt.-Kst. | Kost1 | Validator (required) | kost1 |
KOST2 | Kostenstelle/-träger | Kost2, Kst. | Validator (required) | kost2 |
MENGE | Menge | — | — | menge |
BELEG | Beleg | — | — | beleg |
DATUM | Datum | — | DateValidator (German formats, 1990–2100) | datum |
TEXT | Text | — | — | text |
KOMMENTAR | Kommentar | Bemerkung | — | comment |
doImport(workbook) iterates all sheets (0..N).DATUM, SATZNR, BETRAG, KONTO, GEGENKONTO, KOST1, KOST2.sheet.analyze(true) validates all data.importBuchungssaetze(sheet, month) iterates data rows:
PFDay; validates year consistency (all entries must be in same year).Konto and Gegenkonto via kontoDao.getKonto() — errors recorded if not found.Kost1 and Kost2 via respective DAOs — errors recorded if not found.satz.calculate(true) for final computation.MyImportedElement for diff/reconciliation support.Uses ExcelColumnDateValidator with German date formats. Range: 1990-01-01 to 2100-12-31.
868d6abb7 2025 -> 2026 312d5e61c Clean-up 63081666f Source file headers: 2024-> 2025. 1012e347a Migration stuff in progress... (all tests of all packages: OK). 1204b927b Migration stuff in progress... (all tests of all packages: OK). 3aeda5ef5 Big change: all save|update|...InTrans renamed (InTrans removed). b095e6f7d !!!!! Big change of Transaction handling: Re-uses PfPersistenceContext. b6092df09 Copyright 2023 -> 2024 ab45d51fa Copyright 2001-2022 -> 2001-2023. 5f7ef41b8 Copyright 2021 -> 2022