This is an automated email from the ASF dual-hosted git repository.

mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new f9a9eea814 Fixed: findCustomTimePeriods thruDate boundary and exclude 
flag (OFBIZ-13527)
f9a9eea814 is described below

commit f9a9eea814d5552a767828e39f3604e20d464230
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 b83bd39ea1..2162ecb759 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)
@@ -55,7 +55,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) {

Reply via email to