exception handling processIt on MInOut

This commit is contained in:
uthadehikaru 2012-04-21 15:39:45 -05:00
parent 1fe7383c47
commit a6a11d65f7
1 changed files with 8 additions and 2 deletions

View File

@ -1684,7 +1684,10 @@ public class MInOut extends X_M_InOut implements DocAction
log.fine(dropShipment.toString());
dropShipment.setDocAction(DocAction.ACTION_Complete);
dropShipment.processIt(DocAction.ACTION_Complete);
// added AdempiereException by Amir Sehan
if (!dropShipment.processIt(DocAction.ACTION_Complete))
throw new AdempiereException("Failed Processing Document - " + dropShipment);
// end added
dropShipment.saveEx();
return dropShipment;
@ -1903,7 +1906,10 @@ public class MInOut extends X_M_InOut implements DocAction
if (counterDT.getDocAction() != null)
{
counter.setDocAction(counterDT.getDocAction());
counter.processIt(counterDT.getDocAction());
// added AdempiereException by Amir Sehan
if (!counter.processIt(counterDT.getDocAction()))
throw new AdempiereException("Failed Processing Document - " + counter);
// end added
counter.saveEx(get_TrxName());
}
}