AbstractRechnungsPositionDO.ktAbstract base class for invoice position entities in ProjectForge. Serves as the shared superclass for both outgoing invoice positions (RechnungsPositionDO) and incoming invoice positions (EingangsrechnungsPositionDO). Provides common fields such as position number, text, quantity (menge), unit net price (einzelNetto), and VAT rate (vat), along with logic for managing cost assignments (KostZuweisungDO).
Extends DefaultBaseDO, implements DisplayNameCapable and IRechnungsPosition. Annotated with @MappedSuperclass so it is not itself a database table — concrete subclasses provide their own JPA mappings.
| Property | Type | DB Column | Description |
|---|---|---|---|
number | Short | number | Position number, starting at 1 |
text | String? | s_text (1000) | Invoice line item description |
menge | BigDecimal? | menge | Quantity (precision 18, scale 5) |
einzelNetto | BigDecimal? | einzel_netto | Unit net price (precision 18, scale 2) |
vat | BigDecimal? | vat | VAT rate (precision 10, scale 5) |
kostZuweisungen | MutableList<KostZuweisungDO>? | transient | Cost assignment list (abstract, provided by subclass) |
info | RechnungPosInfo | transient | Calculated invoice position info (set via RechnungCalculator) |
The class provides methods for managing KostZuweisungDO cost assignments bound to each invoice position:
addKostZuweisung(kostZuweisung) — Appends a cost assignment with auto-incremented indexdeleteKostZuweisung(idx) — Removes a cost assignment at the given index (only deletable if not yet persisted, i.e. id == null)ensureAndGetKostzuweisungen() — Returns the mutable list, lazily initializing it if nullisKostZuweisungDeletable() — Guards against deleting already-persisted cost assignmentsgetKostZuweisung(idx) — Returns the cost assignment at the given index or null| Property | Type | Description |
|---|---|---|
displayName | String | Returns the position number as a string |
isEmpty | Boolean | True if text is blank and einzelNetto is null or zero |
isInfoInitialized | Boolean | True if the lateinit info has been initialized |
Equality is based on number and rechnungId (the parent invoice ID). The rechnungId is an abstract property implemented by concrete subclasses.
info property is marked @CandHIgnore to prevent CandH (Copy-and-History) from attempting to handle it, since it's not always initialized.open to support Hibernate lazy-loading proxies.checkKostZuweisungId abstract method lets subclasses validate that a cost assignment belongs to this position.868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
5f9bbfbd3 Fix typos in projectforge-business directory
197d60efa Finance: incoming invoices fixed.
ff2cc4cfa Migration stuff in progress... (all tests of all packages: OK).
ba2479571 Migration stuff in progress...
b47c21af6 Refactored caching and calculations with invoices (not yet finished)
4c04cfd65 MAJOR-CHANGE! Migration of integer id's to Long id's (including fk's etc.)
06828f490 Migration stuff in progress...
b6092df09 Copyright 2023 -> 2024
ab45d51fa Copyright 2001-2022 -> 2001-2023.
5f7ef41b8 Copyright 2021 -> 2022
a7fceb731 Some compiler warnings fixed.
ceb63e8a1 Source code header: (C) 2001-2021.
a1cf6f591 Code Cleanup
07cb34acb IRechnung, IRechnungsPosition introduced. DTOs fro Eingangsrechnung{sPosition}DO added.
552603f75 Rename setter methods in RechnungDO to avoid conflicts with Jackson
b78b870bd ShortDisplayNameCapable -> DisplayNameCapable.
7c79f1922 Copyright of source header -> 2020.
8241700f0 ShortDisplayNameCapable converted to Kotlin. DO classes implementing ShortDisplayNameCapable refactored.
7588a4be8 AbstractRechnungsPositionsDO.isEmpty fixed.
bc7b1761c Eingangsrechnungen: Kostzuweisungen fixed.
e63a1e98e AuftragsPositionDO: Bug fix KostZuweisungen handled now in update method.
8675a1dbe Found big performance issue: Declared all Kotlin JPA entities and their properties as open. Lazy loading wasn't supported by Hibernate...
483b8409d Heavy WIP: refactoring of (Eingangs)Rechnung*.
a55ef0c14 Heavy WIP: refactoring of (Eingangs)Rechnung*.
812b5b751 Heavy WIP: refactoring of (Eingangs)Rechnung*.
339e017b4 ElementRegistry: @PropertyInfo is now also supported for getter methods of read-only vals.
dd1dc1bef EingangsrechnungRest: Add position list to edit page
c9c80e385 AbstractRechnungsPositionDO.kt: Resolve warnings
f2b55f6aa RechnungsPositionDO.java -> RechnungsPositionDO.kt (initial Kotlin conversion)