From e0ab57bb42d988314cb47071b186dca477233c62 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Fri, 3 Aug 2018 12:00:26 +0800 Subject: [PATCH] AP2-512 Need to post GL Journal for balance forward that includes CAD and USD (IDEMPIERE-3777) --- org.adempiere.base/src/org/compiere/acct/Doc_GLJournal.java | 5 ++++- org.adempiere.base/src/org/compiere/model/MJournal.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_GLJournal.java b/org.adempiere.base/src/org/compiere/acct/Doc_GLJournal.java index 176aad9013..4a37177e37 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_GLJournal.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_GLJournal.java @@ -93,7 +93,10 @@ public class Doc_GLJournal extends Doc MAccount account = line.getAccount_Combi(); docLine.setAccount (account); // -- Organization of Line was set to Org of Account - list.add(docLine); + list.add(docLine); + + if (docLine.getC_Currency_ID() != getC_Currency_ID()) + setIsMultiCurrency(true); } // Return Array int size = list.size(); diff --git a/org.adempiere.base/src/org/compiere/model/MJournal.java b/org.adempiere.base/src/org/compiere/model/MJournal.java index 24b00150a0..36d16eeedd 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournal.java +++ b/org.adempiere.base/src/org/compiere/model/MJournal.java @@ -527,8 +527,8 @@ public class MJournal extends X_GL_Journal implements DocAction } // end BF [2789319] No check of Actual, Budget, Statistical attribute - AmtSourceDr = AmtSourceDr.add(line.getAmtSourceDr()); - AmtSourceCr = AmtSourceCr.add(line.getAmtSourceCr()); + AmtSourceDr = AmtSourceDr.add(line.getAmtAcctDr()); // multi-currency + AmtSourceCr = AmtSourceCr.add(line.getAmtAcctCr()); } setTotalDr(AmtSourceDr); setTotalCr(AmtSourceCr);