From 81e3e9afbfcc4bf5d0c3d96aea88f7316a77692b Mon Sep 17 00:00:00 2001
From: Hans Auler GmbH
Date: Tue, 25 Oct 2016 12:02:05 +0200
Subject: [PATCH] IDEMPIERE-3229 - Wrong accounting facts by using the GL
Distribution - Line_ID is not transfered
In the method distribute() from Fact.java is the line_id for factLine with 0
defined and later not updated, so the
posting has always Line_ID=null in the destination-accounting-record.
Queries like taxcorrection by discount or write off are searching for accounting
facts with line_id = null and get wrong information.
---
org.adempiere.base/src/org/compiere/acct/Fact.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.adempiere.base/src/org/compiere/acct/Fact.java b/org.adempiere.base/src/org/compiere/acct/Fact.java
index d731e023b5..4565ec1622 100644
--- a/org.adempiere.base/src/org/compiere/acct/Fact.java
+++ b/org.adempiere.base/src/org/compiere/acct/Fact.java
@@ -734,7 +734,7 @@ public final class Fact
if (!dl.isActive() || dl.getAmt().signum() == 0)
continue;
FactLine factLine = new FactLine (m_doc.getCtx(), m_doc.get_Table_ID(),
- m_doc.get_ID(), 0, m_trxName);
+ m_doc.get_ID(), dLine.getLine_ID(), m_trxName);
// Set Info & Account
factLine.setDocumentInfo(m_doc, dLine.getDocLine());
factLine.setAccount(m_acctSchema, dl.getAccount());