From b0f7cda146f81ecf3806e3915ee16fb6bda48783 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Tue, 4 Jul 2017 17:47:43 +0800 Subject: [PATCH] IDEMPIERE-3419 Wrong Account date in Matched PO if invoice and MR in different periods --- org.adempiere.base/src/org/compiere/model/MMatchPO.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MMatchPO.java b/org.adempiere.base/src/org/compiere/model/MMatchPO.java index 0a68c9ef53..44a4e8977c 100644 --- a/org.adempiere.base/src/org/compiere/model/MMatchPO.java +++ b/org.adempiere.base/src/org/compiere/model/MMatchPO.java @@ -456,8 +456,11 @@ public class MMatchPO extends X_M_MatchPO } if (iLine != null) mpo.setC_InvoiceLine_ID(iLine); - if (sLine != null) + if (sLine != null){ mpo.setM_InOutLine_ID(sLine.getM_InOutLine_ID()); + if (!mpo.isPosted()) + mpo.setDateAcct(sLine.getParent().getDateAcct()); + } if (!mpo.save()) {