IDEMPIERE-3697 IDEMPIERE-3598 AP2-821 Invoice reversals not updating PO record as expected. Fix condition for auto create of matchpo in matchpo.reverse

This commit is contained in:
Heng Sin Low 2018-12-10 21:30:18 +08:00
parent 33b8b505d7
commit 021eb6d27f
1 changed files with 1 additions and 1 deletions

View File

@ -1289,7 +1289,7 @@ public class MMatchPO extends X_M_MatchPO
this.saveEx();
// auto create new matchpo if have invoice line
if ( reversal.getC_InvoiceLine_ID() > 0)
if ( reversal.getC_InvoiceLine_ID() > 0 && reversal.getM_InOutLine_ID() > 0 )
{
MMatchPO[] matchPOs = MMatchPO.getOrderLine(reversal.getCtx(), reversal.getC_OrderLine_ID(), reversal.get_TrxName());
BigDecimal matchQty = getQty();