Fixes issue 29876: Avoid error when posting a multi-general ledger G/L Journal
authorAlvaro Ferraz <alvaro.ferraz@openbravo.com>
Tue, 17 Mar 2015 11:56:11 +0100
changeset 26675 ef112441fbf6
parent 26674 d4b570009f3e
child 26676 24da1cff74ce
Fixes issue 29876: Avoid error when posting a multi-general ledger G/L Journal

General Ledger will be taken from G/L Item instead from Simple G/L Journal when it is marked as multi-general ledger, because in this case General Ledger from Simple G/L Journal will be empty
src/org/openbravo/erpCommon/ad_forms/DocGLJournal_data.xsql
--- a/src/org/openbravo/erpCommon/ad_forms/DocGLJournal_data.xsql	Mon May 11 10:53:02 2015 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocGLJournal_data.xsql	Tue Mar 17 11:56:11 2015 +0100
@@ -12,7 +12,7 @@
  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
  * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
  * Contributor(s): Openbravo SLU
- * Contributions are Copyright (C) 2001-2010 Openbravo S.L.U.
+ * Contributions are Copyright (C) 2001-2015 Openbravo S.L.U.
  ******************************************************************************
 -->
 
@@ -82,7 +82,7 @@
                   JOIN C_GLITEM_ACCT GLACT ON (GL_JOURNALLINE.ACCOUNT_ID = GLACT.C_GLITEM_ID)
                 WHERE GL_JOURNAL.MULTI_GL = 'Y'
                 AND   GL_JOURNAL.GL_JOURNAL_ID = ?
-                AND   GL_JOURNAL.C_ACCTSCHEMA_ID = ?) AS FINACCTCOUNT
+                AND   GLACT.C_ACCTSCHEMA_ID = ?) AS FINACCTCOUNT
         FROM DUAL
      ]]>
      </Sql>