AuftragsPositionDO.ktAuftragDO (order/proposal). Each order can have multiple positions, uniquely identified by (auftrag_fk, number). Tracks financial data (net sum, person days), status, payment type, classification (art), and invoicing flags. Implements DisplayNameCapable and is fully indexed by Hibernate Search for full-text search capabilities.
| Annotation | Value/Details |
|---|---|
@Entity | JPA entity |
@Indexed | Hibernate Search full-text index |
@TypeBinding | HibernateSearchAuftragsPositionTypeBinder — custom binder for position-specific search |
@ClassBridge(name = "position") | Custom class bridge used for composite search field |
@Table | t_fibu_auftrag_position with unique constraint (auftrag_fk, number) |
| Index Name | Column |
|---|---|
idx_fk_t_fibu_auftrag_position_auftrag_fk | auftrag_fk |
idx_fk_t_fibu_auftrag_position_task_fk | task_fk |
FIND_BY_ID = "AuftragPositionDO_FindById" — simple lookup by primary key.
| Field | DB Column | Type | Description |
|---|---|---|---|
number | number (not null) | Short | Position number within the order (e.g., 1, 2, 3…) |
auftrag | auftrag_fk (FK, not null) | AuftragDO | Parent order — @JsonIgnore to prevent circular serialization; @JsonSerialize(IdOnlySerializer) on web layer |
task | task_fk (FK, nullable) | TaskDO | Associated project task, serialized as ID-only |
art | art (VARCHAR 30) | AuftragsPositionsArt enum | Classification: CHANGE_REQUEST, DAUERNDE_LEISTUNG, WARTUNG, NEUENTWICKLUNG |
paymentType | paymentType (VARCHAR 30) | AuftragsPositionsPaymentType enum | Payment model: FESTPREISPAKET, TIME_AND_MATERIALS, PAUSCHALE |
forecastType | forecast_type (VARCHAR 20) | AuftragForecastType enum | Override for parent order's forecast type (current/following month) |
status | status (VARCHAR 30) | AuftragsStatus enum | Current status (e.g., ABGESCHLOSSEN, IN_ERSTELLUNG) |
titel | titel (VARCHAR 255) | String | Position title — @FullTextField for Hibernate Search |
bemerkung | bemerkung (4000) | String | Free-text comment — @FullTextField |
nettoSumme | netto_summe (12,2) | BigDecimal | Net amount for this position — @GenericField |
personDays | person_days (12,2) | BigDecimal | Person-days assigned; may differ from calculated net sum |
vollstaendigFakturiert | vollstaendig_fakturiert (not null) | Boolean | Manually set by finance department — only for completed positions |
periodOfPerformanceType | period_of_performance_type (VARCHAR 10) | PeriodOfPerformanceType enum | Defaults to SEEABOVE; OWN if position has its own PoP |
periodOfPerformanceBegin | period_of_performance_begin | LocalDate | Start of performance period |
periodOfPerformanceEnd | period_of_performance_end | LocalDate | End of performance period |
modeOfPaymentType | mode_of_payment_type (VARCHAR 13) | ModeOfPaymentType enum | Mode of payment |
displayName — "{order.nummer}.{number}" format, e.g., "12345.2"formattedNumber — same as displayName: "{auftrag?.nummer}.{number}"isEmpty — returns true if title is blank AND net sum is zero/null AND comment is blankhasOwnPeriodOfPerformance() — returns true if periodOfPerformanceType == PeriodOfPerformanceType.OWNcheckVollstaendigFakturiert() — throws UserException if vollstaendigFakturiert is set to true but the status is not ABGESCHLOSSEN (only completed positions may be marked as fully invoiced).
Equality (and hash) is based on number and auftrag.id — two positions are considered equal if they share the same position number within the same parent order.
The entity uses @TypeBinding with HibernateSearchAuftragsPositionTypeBinder and a custom @ClassBridge(name = "position"). Several fields carry @FullTextField (art, forecastType, status, titel, bemerkung) and @GenericField (nettoSumme) for Hibernate Search indexing. The class bridge enables composite search across position-related fields.
AuftragDO — the order containing this positionAuftragsPositionsArt, AuftragsPositionsPaymentType, AuftragsStatus, AuftragForecastType, PeriodOfPerformanceType, ModeOfPaymentTypeAuftragsCacheService — loads positions via tuple queries for performanceHibernateSearchAuftragsPositionTypeBinder — custom search bindingIdOnlySerializer — serializes FK references as IDs only868d6abb7 2025 -> 2026 49b1d6b8d Forecast and orderbook: forecast-Type for orders/positions added (current month or following month) 63081666f Source file headers: 2024-> 2025. 0237d5eba Json serialization refactored: IdOnlySerializer and IdsOnlySerializer introduced. a35971f85 Issues from last pull request resolved. Great thanx to luzpaz. 56e9a4c44 WIP: orderbook storage. c193e8288 Ical4j: migration stuff... (all tests OK) ae2c04ee0 Migration stuff in progress... (all tests of all packages: OK). 3f25c773a Migration stuff in progress... 184f154a5 Migration stuff in progress... f31e8064e Migration stuff in progress... 87dd5b87c AuftragsCache refactored, migration stuff... (all tests OK) 6f7e0fbc7 Migration stuff in progress... 4c04cfd65 MAJOR-CHANGE! Migration of integer id's to Long id's (including fk's etc.) c4950ae12 Migration stuff in progress... f5c09f87f Migration stuff in progress... c04fb0d51 Migration stuff in progress... 06828f490 Migration stuff in progress... b6092df09 Copyright 2023 -> 2024 ab45d51fa Copyright 2001-2022 -> 2001-2023. 9a65e1bc0 AuftragDO: statistics refactored (not yet invoiced, to be invoiced, invoiced etc.) ed17a2353 ForecastExport shows now more invoices (also invoices without orders) 5f7ef41b8 Copyright 2021 -> 2022 c0f2b9de0 Tenants functionality removed everywhere (untested). db3b02da7 UserException moved from business to common package (AccesssException affected). UserException will now be returned as Toast for Rest clients on default. FileSizeChecker WIP. ceb63e8a1 Source code header: (C) 2001-2021. d89920003 Order book filter "to be invoiced" added. ca0d5470e Remove DateBridges from DOs. a6a7aece4 Optimize Imports 78b436d9e Replace instances of java.util.date and java.sql.Date with java.time.LocalDate b78b870bd ShortDisplayNameCapable -> DisplayNameCapable. 7c79f1922 Copyright of source header -> 2020. 2fa37a281 AuftragsPositionDO.formattedNumber simplified. 8241700f0 ShortDisplayNameCapable converted to Kotlin. DO classes implementing ShortDisplayNameCapable refactored. e7e42d821 AuftragsPositionDO.titel as hibernate search index. ff4c3dcf3 fix auftrag position layout 19b97fcc3 DateBridge: encoding = EncodingType.STRING for all DateBridges in all DO's. 8675a1dbe Found big performance issue: Declared all Kotlin JPA entities and their properties as open. Lazy loading wasn't supported by Hibernate and results in thousands of JPA queries... d36fe6ad9 Heavy WIP: refactoring 39cdd224c Hibernate search: DateBridge... 985286296 hibernate 5.4.3 -> 5.4.4, ehcache introduced (again). 12c7143a5 AuftragRest: Added EditPage elements 97d00031d Auftrag*DO, AddressDO, *Rechnung*DO: performance improved (using now LAZY instead of EAGER loading). 2ed09316e AuftragsPositionDO.kt: Resolve warnings ca013f56b AuftragsPositionDO.kt: all fields must be nullable (for deserialization purposes): vollstaendigFakturiert and periodOfPerformanceType. 05244ff19 CopyRight of all Kotlin file-header updated or created. 6dc8997a3 AuftragsPositionDO.java -> AuftragsPositionDO.kt