svn commit: r1647490 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1647490 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java

jleroux@apache.org
Author: jleroux
Date: Tue Dec 23 06:43:36 2014
New Revision: 1647490

URL: http://svn.apache.org/r1647490
Log:
Fixes a missing .from("CustomTimePeriod") in EntityQuery
Small formatting

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java?rev=1647490&r1=1647489&r2=1647490&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java Tue Dec 23 06:43:36 2014
@@ -71,7 +71,7 @@ public class PeriodServices {
                 // if a periodTypeId was supplied, use it
                 findClosedConditions.add(EntityCondition.makeConditionMap("periodTypeId", periodTypeId));
             }
-            GenericValue closedTimePeriod = EntityQuery.use(delegator).select("customTimePeriodId", "periodTypeId", "isClosed", "fromDate", "thruDate")
+            GenericValue closedTimePeriod = EntityQuery.use(delegator).from("CustomTimePeriod").select("customTimePeriodId", "periodTypeId", "isClosed", "fromDate", "thruDate")
                     .where(findClosedConditions).orderBy("thruDate DESC").queryFirst();
 
             if (closedTimePeriod != null && closedTimePeriod.get("thruDate") != null) {
@@ -88,8 +88,7 @@ public class PeriodServices {
                 if (timePeriod != null && timePeriod.get("fromDate") != null) {
                     lastClosedDate = UtilDateTime.toTimestamp(timePeriod.getDate("fromDate"));
                 } else {
-                    return ServiceUtil.returnError(UtilProperties.getMessage(resource,
-                            "AccountingPeriodCannotGet", locale));
+                    return ServiceUtil.returnError(UtilProperties.getMessage(resource, "AccountingPeriodCannotGet", locale));
                 }
             }