IDEMPIERE-3910 M_Cost=>Current Cost/Costing Qty not updated due to matched PO posting by accounting engine
This commit is contained in:
parent
9f3ab12923
commit
74cdad25a9
|
@ -41,6 +41,7 @@ import org.compiere.model.MProduct;
|
||||||
import org.compiere.model.MTax;
|
import org.compiere.model.MTax;
|
||||||
import org.compiere.model.ProductCost;
|
import org.compiere.model.ProductCost;
|
||||||
import org.compiere.model.X_M_InOut;
|
import org.compiere.model.X_M_InOut;
|
||||||
|
import org.compiere.process.DocAction;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Util;
|
import org.compiere.util.Util;
|
||||||
|
@ -113,8 +114,13 @@ public class Doc_MatchPO extends Doc
|
||||||
{
|
{
|
||||||
if (matchPO.getM_InOutLine_ID() > 0 && matchPO.getC_InvoiceLine_ID() == 0)
|
if (matchPO.getM_InOutLine_ID() > 0 && matchPO.getC_InvoiceLine_ID() == 0)
|
||||||
{
|
{
|
||||||
m_M_InOutLine_ID = matchPO.getM_InOutLine_ID();
|
String docStatus = matchPO.getM_InOutLine().getM_InOut().getDocStatus();
|
||||||
break;
|
if (docStatus.equals(DocAction.STATUS_Completed) || docStatus.equals(DocAction.STATUS_Closed)) {
|
||||||
|
if (matchPO.getQty().compareTo(getQty()) <= 0) {
|
||||||
|
m_M_InOutLine_ID = matchPO.getM_InOutLine_ID();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -184,8 +190,13 @@ public class Doc_MatchPO extends Doc
|
||||||
{
|
{
|
||||||
if (matchPO.getM_InOutLine_ID() > 0 && matchPO.getC_InvoiceLine_ID() == 0)
|
if (matchPO.getM_InOutLine_ID() > 0 && matchPO.getC_InvoiceLine_ID() == 0)
|
||||||
{
|
{
|
||||||
m_M_InOutLine_ID = matchPO.getM_InOutLine_ID();
|
String docStatus = matchPO.getM_InOutLine().getM_InOut().getDocStatus();
|
||||||
break;
|
if (docStatus.equals(DocAction.STATUS_Completed) || docStatus.equals(DocAction.STATUS_Closed)) {
|
||||||
|
if (matchPO.getQty().compareTo(getQty()) <= 0) {
|
||||||
|
m_M_InOutLine_ID = matchPO.getM_InOutLine_ID();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue