From e735c686ca801da652cceaf8f1f5b29760cbe50d Mon Sep 17 00:00:00 2001 From: hengsin Date: Wed, 22 Jan 2020 22:20:26 +0800 Subject: [PATCH] IDEMPIERE-4155 Follow up for IDEMPIERE-3742 Wrong product cost for partial MR --- org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java index b72985612d..8fba5daa8f 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java @@ -549,7 +549,8 @@ public class Doc_MatchPO extends Doc if (m_oLine.getC_Currency_ID() != as.getC_Currency_ID()) { MOrder order = m_oLine.getParent(); - if(MAcctSchema.COSTINGMETHOD_AveragePO.equals(as.getCostingMethod())) + MProduct product = new MProduct(getCtx(), m_oLine.getM_Product_ID(), getTrxName()); + if(MAcctSchema.COSTINGMETHOD_AveragePO.equals(product.getCostingMethod(as))) { orderCost = mPO[i].getM_InOutLine().getC_OrderLine().getPriceActual(); Timestamp dateAcct = mPO[i].getM_InOutLine().getM_InOut().getDateAcct();