#948: IRechnung.kt
projectforge-business/src/main/kotlin/org/projectforge/business/fibu/IRechnung.kt Type: Interface · Purpose: Abstract contract for invoice-like objects used by RechnungCalculator · Source: projectforge-business/src/main/kotlin/org/projectforge/business/fibu/IRechnung.kt 35 lines · 7 code · 25 comments · 3 blank
Core interface needed by RechnungCalculator for polymorphic invoice calculations. Provides a unified API over outgoing invoices (RechnungDO) and incoming invoices (EingangsrechnungDO), exposing payment amount, positions, and currency.
Interface Design
| Property | Type | Description |
zahlBetrag | BigDecimal? | Total payment amount (nullable) |
positionen | List? | List of invoice positions |
currency | String? | ISO currency code (e.g. "EUR", "USD") |
Implementors
AbstractRechnungDO — base class for both incoming and outgoing invoices
RechnungDO — outgoing invoices to customers
EingangsrechnungDO — incoming invoices from vendors
Design Rationale
Introduced together with IRechnungsPosition to decouple the RechnungCalculator from concrete entity types. This allows the same calculation logic (net/gross sums, VAT, currency conversion) to operate on any invoice-like DTO without JPA entity dependencies. The currency field was added later to support multi-currency invoice processing.
Architecture Analysis
Resides in projectforge-business, the core module containing domain logic, services, and persistence. Defines a contract/interface that multiple implementations can satisfy, enabling polymorphic behavior and testability.
Git History
| Commit | What changed |
|---|
868d6abb75 | 2025 -> 2026 |
4d4c6b449b | Currency field added to invoices (incoming and outgoing) |
63081666f6 | Source file headers: 2024-> 2025. |
b47c21af64 | Refactored caching and calculations with invoices (not yet finished) |
b6092df092 | Copyright 2023 -> 2024 |
ab45d51fa4 | Copyright 2001-2022 -> 2001-2023. |
2dc192b7a5 | AG grid: auto-format of currency, Formatter works now also with AG grid (rating, dates, timestamps). Currency rendering by client (Formatter.jsx) added. |
5f7ef41b8c | Copyright 2021 -> 2022 |
4c615b323a | Nothing real: compiler warnings fixed. |
ceb63e8a1b | Source code header: (C) 2001-2021. |
07cb34acba | IRechnung, IRechnungsPosition introduced. DTOs fro Eingangsrechnung{sPosition}DO added. |