IDEMPIERE-4155 Follow up for IDEMPIERE-3742 Wrong product cost for partial MR

This commit is contained in:
hengsin 2020-01-22 22:20:26 +08:00
parent 96eba5f89a
commit e735c686ca
1 changed files with 2 additions and 1 deletions

View File

@ -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();