AuftragFilter.ktMain search filter for the order book (Auftragsbuch). Extends BaseSearchFilter, implements Serializable and SearchFilterWithPeriodOfPerformance. Supports filtering orders by user assignment, date ranges, period of performance, order status, position type (AuftragsPositionsArt), position payment type, invoiced status, and project membership. Used both by the backend DAO for database queries and by the frontend for programmatic result filtering via match().
@XStreamAlias("AuftragFilter")
class AuftragFilter @JvmOverloads constructor(filter: BaseSearchFilter? = null) : BaseSearchFilter(filter),
Serializable, SearchFilterWithPeriodOfPerformance
| Property | Type | Default | Description |
|---|---|---|---|
user | PFUserDO? | null | Filter by assigned user (project manager, head of business, sales manager, or contact person) |
startDate | LocalDate? | null | Filter by creation date (from) |
endDate | LocalDate? | null | Filter by creation date (to) |
periodOfPerformanceStartDate | LocalDate? | null | Period of performance lower bound |
periodOfPerformanceEndDate | LocalDate? | null | Period of performance upper bound |
auftragsStatuses | MutableList<AuftragsStatus> | empty | Filter by order/position status values |
auftragsPositionsArten | ArrayList<AuftragsPositionsArt> | empty | Filter by position type categories |
auftragFakturiertFilterStatus | AuftragFakturiertFilterStatus? | ALL | Filter by invoiced status (ALL / ZU_FAKTURIEREN / FAKTURIERT / NICHT_FAKTURIERT) |
auftragsPositionsPaymentType | AuftragsPositionsPaymentType? | null | Filter by position payment type (null = all) |
projectList | Collection<ProjektDO>? | null | Filter by project membership |
match(auftrag): BooleanChecks if an order passes all active filters. Evaluates in order:
matchUser — user assignmenterfassungsDatum against startDate/endDate)matchProjectList — project membershipmatchAuftragsStatus — status matchingmatchAuftragsPositionsArten — position type matchingShort-circuits: returns false immediately on the first non-matching criterion.
matchUser(auftrag): BooleanReturns true if the filter's user is null, or if the user's ID matches any of: projectManager.id, headOfBusinessManager.id, contactPerson.id, or salesManager.id.
matchProjectList(auftrag): BooleanReturns true if projectList is null or empty, or if the order's projekt.id is found in the list.
matchAuftragsStatus(auftrag): BooleanReturns true if auftragsStatuses is empty, or if the order's status matches, or if any non-deleted position's status matches.
matchAuftragsPositionsArten(auftrag): BooleanReturns true if auftragsPositionsArten is empty, or if any non-deleted position has a matching art.
filterFakturiert(list): List<AuftragDO> — Filters a result list by invoiced status using AuftragsCache:
| Status | Condition |
|---|---|
ALL or null | No filtering |
ZU_FAKTURIEREN | orderInfo.toBeInvoiced == true |
FAKTURIERT | orderInfo.isVollstaendigFakturiert == true |
NICHT_FAKTURIERT | orderInfo.notYetInvoicedSum > BigDecimal.ZERO |
reset() clears all filter fields and returns this for fluent chaining.
868d6abb7 2025 -> 2026 26f08992e WIP: order forecast and snapshots. 7b32b554a WIP: Forecast of orders... AuftragFilter refactored. 63081666f Source file headers: 2024-> 2025. 9c633d4ce AuftragDao/AuftragFilter: to-be-invoiced and fully-invoiced fixed. 9aff90908 Migration stuff in progress... 3f25c773a Migration stuff in progress... 67ce75fe9 Migration stuff in progress... fba4da3f5 ForecastExport now usable for scripts. AuftragFilter.projectList added... b6092df09 Copyright 2023 -> 2024 ab45d51fa Copyright 2001-2022 -> 2001-2023. 9a65e1bc0 AuftragDO: statistics refactored (not yet invoiced, to be invoiced, invoiced etc.) 013c514bd AuftragsCache for much better performance of order book's list view. 9ec78f80a AuftragDO/AuftragFilter: ignore deleted positions and payment Schedules for orders to be invoiced. 5f7ef41b8 Copyright 2021 -> 2022 ceb63e8a1 Source code header: (C) 2001-2021. d89920003 Order book filter "to be invoiced" added. 78b436d9e Replace instances of java.util.date and java.sql.Date with java.time.LocalDate 7c79f1922 Copyright of source header -> 2020. b0a4e8463 tidy up 9448cfc6e AuftragDao: JPA 706ed61a0 AuftragDao -> JPA bf525ef55 AuftragFilter.java -> Kotlin