Author: jleroux
Date: Fri Jul 23 15:34:31 2010
New Revision: 967136

URL: http://svn.apache.org/viewvc?rev=967136&view=rev
Log:
"Applied fix from trunk for revision: 967098"  (resolved conflict by hand)
------------------------------------------------------------------------
r967098 | jleroux | 2010-07-23 15:59:16 +0200 (ven. 23 juil. 2010) | 4 lignes

A patch from Sascha Rodekamp "NPE in Financial Account Services" 
(https://issues.apache.org/jira/browse/OFBIZ-3873) - OFBIZ-3873

NPE in the financial account services when creating a financial account for a 
store. The error occurred when the accountValidDays is empty. The thru date can 
not be set.
This patch covers this issue by checking if accountValidDays is empty or not.
------------------------------------------------------------------------

Modified:
    ofbiz/branches/release4.0/   (props changed)
    
ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java

Propchange: ofbiz/branches/release4.0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 23 15:34:31 2010
@@ -1 +1 @@
-/ofbiz/trunk:536399,539836-539837,618970,627900,629279,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692,721839,721887,728935,737443,738870,741491,808792,814731,827730,890245,942884,943168,954956,958343,965916
+/ofbiz/trunk:536399,539836-539837,618970,627900,629279,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692,721839,721887,728935,737443,738870,741491,808792,814731,827730,890245,942884,943168,954956,958343,958514,965916,967098

Modified: 
ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java?rev=967136&r1=967135&r2=967136&view=diff
==============================================================================
--- 
ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
 (original)
+++ 
ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
 Fri Jul 23 15:34:31 2010
@@ -75,7 +75,9 @@ public class FinAccountServices {
             }
 
             // set the dates/userlogin
-            inContext.put("thruDate", UtilDateTime.getDayEnd(now, 
accountValidDays.intValue()));
+            if (UtilValidate.isNotEmpty(accountValidDays)){
+                inContext.put("thruDate", UtilDateTime.getDayEnd(now, 
accountValidDays.intValue()));
+            }
             inContext.put("fromDate", now);
             inContext.put("userLogin", userLogin);
 


Reply via email to