details:   /erp/stable/2.50/rev/2c134704328d
changeset: 9549:2c134704328d
user:      Ioritz Cia <ioritz.cia <at> openbravo.com>
date:      Thu Jun 30 09:19:01 2011 +0200
summary:   Fixes issue 17832: Some columns in the Chart of Accounts modules do 
not import properly.

diffstat:

 src/org/openbravo/erpCommon/businessUtility/COAUtility.java          |  10 
+++++-----
 src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java |   4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (49 lines):

diff -r 9b8312fc93b5 -r 2c134704328d 
src/org/openbravo/erpCommon/businessUtility/COAUtility.java
--- a/src/org/openbravo/erpCommon/businessUtility/COAUtility.java       Tue Jun 
21 17:39:16 2011 +0200
+++ b/src/org/openbravo/erpCommon/businessUtility/COAUtility.java       Thu Jun 
30 09:19:01 2011 +0200
@@ -668,8 +668,8 @@
       log4j.debug("insertElementValuesInDB() - Procesing element in position " 
+ i
           + " with default account " + data[i].getDefaultAccount());
 
-      Boolean IsDocControlled = data[i].getAccountDocument().equals("Yes");
-      Boolean IsSummary = data[i].getAccountSummary().equals("Yes");
+      Boolean IsDocControlled = data[i].getAccountDocument().startsWith("Y");
+      Boolean IsSummary = data[i].getAccountSummary().startsWith("Y");
       String C_ElementValue_ID = data[i].getCElementValueId();
       String accountType = setAccountType(data[i]);
       String showValueCond = data[i].getShowValueCond();
@@ -678,8 +678,8 @@
       try {
         String language = OBContext.getOBContext().getLanguage().getLanguage();
 
-        if (!"".equals(showValueCond) && !showValueCond.equals("P") && 
!showValueCond.equals("N")
-            && !showValueCond.equals("A")) {
+        if (!"".equals(showValueCond) && !showValueCond.startsWith("P")
+            && !showValueCond.startsWith("N") && 
!showValueCond.startsWith("A")) {
           showValueCond = null;
           logEvent(String
               .format(Utility.messageBD(new DalConnectionProvider(),
@@ -687,7 +687,7 @@
                   "ShowValueCond"));
         }
 
-        if (!"".equals(titleNode) && !titleNode.equals("Y") && 
!titleNode.equals("N")) {
+        if (!"".equals(titleNode) && !titleNode.startsWith("Y") && 
!titleNode.startsWith("N")) {
           titleNode = null;
           logEvent(String.format(Utility.messageBD(new DalConnectionProvider(),
               "ValueIgnoredImportingAccount", language), 
data[i].getAccountValue(), "TitleNode"));
diff -r 9b8312fc93b5 -r 2c134704328d 
src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java
--- a/src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java      
Tue Jun 21 17:39:16 2011 +0200
+++ b/src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java      
Thu Jun 30 09:19:01 2011 +0200
@@ -728,9 +728,9 @@
       newElementValue.setSummaryLevel(isSummary);
       newElementValue.setElementLevel(elementLevel);
       if (showValueCond != null && !"".equals(showValueCond))
-        newElementValue.setShowValueCondition(showValueCond);
+        newElementValue.setShowValueCondition(showValueCond.substring(0, 1));
       if (titleNode != null && !"".equals(titleNode))
-        newElementValue.setTitleNode("Y".equals(titleNode));
+        newElementValue.setTitleNode("Y".equals(titleNode.subSequence(0, 1)));
       OBDal.getInstance().save(newElementValue);
       if (doFlush)
         OBDal.getInstance().flush();

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to