From b1de6b8bb2dac0972cebcddbc9564dba7d2c8768 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Tue, 23 Dec 2014 06:43:36 +0000 Subject: [PATCH] Fixes a missing .from("CustomTimePeriod") in EntityQuery Small formatting git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647490 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/ofbiz/accounting/period/PeriodServices.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java b/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java index 2c1b84836d..4da8e421ba 100644 --- a/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/period/PeriodServices.java @@ -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)); } }