This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new f30f3e77fe Fixed: findCustomTimePeriods thruDate boundary and exclude
flag (OFBIZ-13527)
f30f3e77fe is described below
commit f30f3e77fee54ce1dcd0da732e8b40bfb4d1125b
Author: Mridul Pathak <[email protected]>
AuthorDate: Wed Sep 9 19:05:23 2026 +0530
Fixed: findCustomTimePeriods thruDate boundary and exclude flag
(OFBIZ-13527)
- Restore strict GREATER_THAN operator for general CustomTimePeriod
thruDate comparison, preventing expired periods from matching when findDate
lands exactly on thruDate.
- Fix excludeNoOrganizationPeriods condition to check != 'Y', ensuring
general periods are included by default when the parameter is omitted and
properly excluded when set to 'Y'.
---
.../groovy/org/apache/ofbiz/accounting/period/GPeriodServices.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/period/GPeriodServices.groovy
b/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/period/GPeriodServices.groovy
index dea7fc7f2b..0eb581a080 100644
---
a/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/period/GPeriodServices.groovy
+++
b/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/period/GPeriodServices.groovy
@@ -47,7 +47,7 @@ Map findCustomTimePeriods() {
.cache()
.queryList())
}
- if (parameters.excludeNoOrganizationPeriods) {
+ if (parameters.excludeNoOrganizationPeriods != 'Y') {
EntityCondition condition = new EntityConditionBuilder().AND {
OR {
EQUALS(organizationPartyId: null)
@@ -56,7 +56,7 @@ Map findCustomTimePeriods() {
}
LESS_THAN_EQUAL_TO(fromDate: parameters.findDate)
OR {
- GREATER_THAN_EQUAL_TO(thruDate: parameters.findDate)
+ GREATER_THAN(thruDate: parameters.findDate)
EQUALS(thruDate: null)
}
if (parameters.onlyIncludePeriodTypeIdList) {