exception handling processIt on MInvoice
This commit is contained in:
parent
a6a11d65f7
commit
9ff7002ff8
|
@ -2027,7 +2027,10 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
if (counterDT.getDocAction() != null)
|
if (counterDT.getDocAction() != null)
|
||||||
{
|
{
|
||||||
counter.setDocAction(counterDT.getDocAction());
|
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());
|
counter.saveEx(get_TrxName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2268,8 +2271,10 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
Env.ZERO, Env.ZERO, Env.ZERO);
|
Env.ZERO, Env.ZERO, Env.ZERO);
|
||||||
rLine.setC_Invoice_ID(reversal.getC_Invoice_ID());
|
rLine.setC_Invoice_ID(reversal.getC_Invoice_ID());
|
||||||
rLine.saveEx();
|
rLine.saveEx();
|
||||||
// Process It
|
// added AdempiereException by Amir Sehan
|
||||||
if (alloc.processIt(DocAction.ACTION_Complete))
|
if (!alloc.processIt(DocAction.ACTION_Complete))
|
||||||
|
throw new AdempiereException("Failed Processing Document - " + alloc);
|
||||||
|
// end added
|
||||||
alloc.saveEx();
|
alloc.saveEx();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue