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
This commit is contained in:
Jacques Le Roux
2014-12-23 06:43:36 +00:00
parent 6dc36838cd
commit b1de6b8bb2
@@ -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));
}
}