Fixes issue 29873: Wrong accounts when posting multi-general ledger G/L Journal
authorAlvaro Ferraz <alvaro.ferraz@openbravo.com>
Wed, 13 May 2015 18:06:30 +0200
changeset 26676 24da1cff74ce
parent 26675 ef112441fbf6
child 26677 ac82e4df4fb9
Fixes issue 29873: Wrong accounts when posting multi-general ledger G/L Journal

When getting accounts from GL Item (while posting a Simple G/L Journal setted as multi-general ledger), they were setted wrongly to accounting lines
src/org/openbravo/erpCommon/ad_forms/DocLine_GLJournal.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocLine_GLJournal.java	Tue Mar 17 11:56:11 2015 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocLine_GLJournal.java	Wed May 13 18:06:30 2015 +0200
@@ -1,3 +1,21 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2014-2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
 package org.openbravo.erpCommon.ad_forms;
 
 import javax.servlet.ServletException;
@@ -35,11 +53,11 @@
           switch (Integer.parseInt(AcctType)) {
           case 1:
             // It is similar to ProductInfo.ACCTTYPE_P_Revenue
-            Account_ID = data[0].glitemCreditAcct;
+            Account_ID = data[0].glitemDebitAcct;
             break;
           case 2:
             // It is similar to ProductInfo.ACCTTYPE_P_Expense
-            Account_ID = data[0].glitemDebitAcct;
+            Account_ID = data[0].glitemCreditAcct;
             break;
           }
         }