details:   https://code.openbravo.com/erp/devel/pi/rev/2df9efa7fba0
changeset: 22856:2df9efa7fba0
user:      Atul Gaware <atul.gaware <at> openbravo.com>
date:      Fri Mar 21 18:20:16 2014 +0530
summary:   Fixes Issue 25643 Restrict import COA having account with Search 
Key, No Name

diffstat:

 src/org/openbravo/erpCommon/businessUtility/COAUtility.java |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r f30733685b92 -r 2df9efa7fba0 
src/org/openbravo/erpCommon/businessUtility/COAUtility.java
--- a/src/org/openbravo/erpCommon/businessUtility/COAUtility.java       Thu Apr 
10 12:29:08 2014 +0200
+++ b/src/org/openbravo/erpCommon/businessUtility/COAUtility.java       Fri Mar 
21 18:20:16 2014 +0530
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -750,6 +750,10 @@
       } else {
         log4j.debug("insertElementValuesInDB() - Inserting element value in 
database");
         ElementValue elementValue = null;
+        if ("".equals(data[i].getAccountName()) || data[i].getAccountName() == 
null) {
+          return logError("@CreateAccountingFailed@" + " Account found without 
name in COA ",
+              " insertElementValuesInDB() - Account found without name in COA 
");
+        }
         try {
           elementValue = InitialSetupUtility.insertElementValue(element, 
organization,
               data[i].getAccountName(), data[i].getAccountValue(), 
data[i].getAccountDescription(),

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to