#949: IRechnungsPosition.kt
projectforge-business/src/main/kotlin/org/projectforge/business/fibu/IRechnungsPosition.kt Type: Interface · Purpose: Abstract contract for invoice position items used by RechnungCalculator · Source: projectforge-business/src/main/kotlin/org/projectforge/business/fibu/IRechnungsPosition.kt 34 lines · 9 code · 22 comments · 3 blank
Core interface defining the contract for individual line items within an invoice. Works in tandem with IRechnung to decouple the invoice calculation engine from concrete JPA entity types.
Interface Design
| Property | Type | Description |
id | Long? | Database identifier (nullable for new positions) |
deleted | Boolean | Soft-delete flag |
menge | BigDecimal? | Quantity of the line item |
einzelNetto | BigDecimal? | Net unit price of a single item |
vat | BigDecimal? | VAT rate as percentage (e.g. 19.00) |
Implementors
AbstractRechnungsPositionDO — base class implementing IRechnungsPosition
RechnungsPositionDO — outgoing invoice position
EingangsrechnungsPositionDO — incoming invoice position
Design Rationale
Introduced alongside IRechnung (commit 07cb34acb) to enable RechnungCalculator to compute net/gross totals, VAT amounts, and cost summaries without depending on concrete entity types. The deleted property allows the calculator to skip soft-deleted positions. Using BigDecimal for financial amounts ensures precision (no floating-point errors).
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 |
63081666f6 | Source file headers: 2024-> 2025. |
b47c21af64 | Refactored caching and calculations with invoices (not yet finished) |
41b5c26459 | Migration stuff in progress... |
b6092df092 | Copyright 2023 -> 2024 |
ab45d51fa4 | Copyright 2001-2022 -> 2001-2023. |
5f7ef41b8c | Copyright 2021 -> 2022 |
ceb63e8a1b | Source code header: (C) 2001-2021. |
07cb34acba | IRechnung, IRechnungsPosition introduced. DTOs fro Eingangsrechnung{sPosition}DO added. |