IDEMPIERE-1174 Match PO not posted after material receipt have been posted when client accounting is post immediate.
This commit is contained in:
parent
35c0c89fb6
commit
5c31c19036
|
@ -1605,15 +1605,11 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
iLine.saveEx(); // update matched invoice with ASI
|
||||
inv.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID());
|
||||
}
|
||||
boolean isNewMatchInv = false;
|
||||
if (inv.get_ID() == 0)
|
||||
isNewMatchInv = true;
|
||||
if (!inv.save(get_TrxName()))
|
||||
{
|
||||
m_processMsg = CLogger.retrieveErrorString("Could not create Inv Matching");
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
if (isNewMatchInv)
|
||||
addDocsPostProcess(inv);
|
||||
}
|
||||
}
|
||||
|
@ -1625,15 +1621,12 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
// Ship - PO
|
||||
MMatchPO po = MMatchPO.create (null, sLine, getMovementDate(), matchQty);
|
||||
if (po != null) {
|
||||
boolean isNewMatchPO = false;
|
||||
if (po.get_ID() == 0)
|
||||
isNewMatchPO = true;
|
||||
if (!po.save(get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Could not create PO Matching";
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
if (isNewMatchPO)
|
||||
if (!po.isPosted())
|
||||
addDocsPostProcess(po);
|
||||
}
|
||||
// Update PO with ASI
|
||||
|
@ -1655,15 +1648,12 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
MMatchPO po = MMatchPO.create (iLine, sLine,
|
||||
getMovementDate(), matchQty);
|
||||
if (po != null) {
|
||||
boolean isNewMatchPO = false;
|
||||
if (po.get_ID() == 0)
|
||||
isNewMatchPO = true;
|
||||
if (!po.save(get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Could not create PO(Inv) Matching";
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
if (isNewMatchPO)
|
||||
if (!po.isPosted())
|
||||
addDocsPostProcess(po);
|
||||
}
|
||||
|
||||
|
|
|
@ -1807,16 +1807,12 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
matchQty = receiptLine.getMovementQty();
|
||||
|
||||
MMatchInv inv = new MMatchInv(line, getDateInvoiced(), matchQty);
|
||||
boolean isNewMatchInv = false;
|
||||
if (inv.get_ID() == 0)
|
||||
isNewMatchInv = true;
|
||||
if (!inv.save(get_TrxName()))
|
||||
{
|
||||
m_processMsg = CLogger.retrieveErrorString("Could not create Invoice Matching");
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
matchInv++;
|
||||
if (isNewMatchInv)
|
||||
addDocsPostProcess(inv);
|
||||
}
|
||||
|
||||
|
@ -1845,18 +1841,15 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
BigDecimal matchQty = line.getQtyInvoiced();
|
||||
MMatchPO po = MMatchPO.create (line, null,
|
||||
getDateInvoiced(), matchQty);
|
||||
boolean isNewMatchPO = false;
|
||||
if (po != null)
|
||||
{
|
||||
if (po.get_ID() == 0)
|
||||
isNewMatchPO = true;
|
||||
if (!po.save(get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Could not create PO Matching";
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
matchPO++;
|
||||
if (isNewMatchPO)
|
||||
if (!po.isPosted())
|
||||
addDocsPostProcess(po);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue