Author: apatel
Date: Wed Jul 8 13:03:07 2009
New Revision: 792128
URL:
http://svn.apache.org/viewvc?rev=792128&view=revLog:
Added empty check for previousTimePeriod.
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy?rev=792128&r1=792127&r2=792128&view=diff==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy Wed Jul 8 13:03:07 2009
@@ -20,6 +20,7 @@
import org.ofbiz.entity.condition.EntityOperator;
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.accounting.util.UtilAccounting;
import java.math.BigDecimal;
import java.util.Calendar;
@@ -38,10 +39,10 @@
if (parameters.timePeriod) {
currentTimePeriod = delegator.findOne("CustomTimePeriod", [customTimePeriodId : parameters.timePeriod], false);
- previousTimePeriod = dispatcher.runSync("getPreviousTimePeriod",
+ previousTimePeriodResult = dispatcher.runSync("getPreviousTimePeriod",
[customTimePeriodId : parameters.timePeriod, userLogin : userLogin]);
-
- if (previousTimePeriod) {
+ previousTimePeriod = previousTimePeriodResult.previousTimePeriod;
+ if (UtilValidate.isNotEmpty(previousTimePeriod)) {
glAccountHistory = delegator.findOne("GlAccountHistory",
[customTimePeriodId : previousTimePeriod.customTimePeriodId, glAccountId : parameters.glAccountId, organizationPartyId : organizationPartyId], false);
if (glAccountHistory) {