exception handling processIt on MPayment
This commit is contained in:
parent
797af7b6b8
commit
332afbcb03
|
@ -1659,8 +1659,10 @@ public final class MPayment extends X_C_Payment
|
||||||
order.setC_Payment_ID(getC_Payment_ID());
|
order.setC_Payment_ID(getC_Payment_ID());
|
||||||
order.setDocAction(X_C_Order.DOCACTION_WaitComplete);
|
order.setDocAction(X_C_Order.DOCACTION_WaitComplete);
|
||||||
order.set_TrxName(get_TrxName());
|
order.set_TrxName(get_TrxName());
|
||||||
// boolean ok =
|
// added AdempiereException by Amir Sehan
|
||||||
order.processIt (X_C_Order.DOCACTION_WaitComplete);
|
if (!order.processIt (X_C_Order.DOCACTION_WaitComplete))
|
||||||
|
throw new AdempiereException("Failed Processing Document - " + order);
|
||||||
|
// end added
|
||||||
m_processMsg = order.getProcessMsg();
|
m_processMsg = order.getProcessMsg();
|
||||||
order.saveEx(get_TrxName());
|
order.saveEx(get_TrxName());
|
||||||
// Set Invoice
|
// Set Invoice
|
||||||
|
@ -1991,7 +1993,10 @@ public final class MPayment extends X_C_Payment
|
||||||
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2055,8 +2060,10 @@ public final class MPayment extends X_C_Payment
|
||||||
pa.saveEx();
|
pa.saveEx();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Should start WF
|
// added AdempiereException by Amir Sehan
|
||||||
alloc.processIt(DocAction.ACTION_Complete);
|
if (!alloc.processIt(DocAction.ACTION_Complete))
|
||||||
|
throw new AdempiereException("Failed Processing Document - " + alloc);
|
||||||
|
// end added
|
||||||
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
|
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
|
||||||
return alloc.save(get_TrxName());
|
return alloc.save(get_TrxName());
|
||||||
} // allocateIt
|
} // allocateIt
|
||||||
|
@ -2088,8 +2095,10 @@ public final class MPayment extends X_C_Payment
|
||||||
aLine.setDocInfo(getC_BPartner_ID(), 0, getC_Invoice_ID());
|
aLine.setDocInfo(getC_BPartner_ID(), 0, getC_Invoice_ID());
|
||||||
aLine.setC_Payment_ID(getC_Payment_ID());
|
aLine.setC_Payment_ID(getC_Payment_ID());
|
||||||
aLine.saveEx(get_TrxName());
|
aLine.saveEx(get_TrxName());
|
||||||
// Should start WF
|
// added AdempiereException by Amir Sehan
|
||||||
alloc.processIt(DocAction.ACTION_Complete);
|
if (!alloc.processIt(DocAction.ACTION_Complete))
|
||||||
|
throw new AdempiereException("Failed Processing Document - " + alloc);
|
||||||
|
// end added
|
||||||
alloc.saveEx(get_TrxName());
|
alloc.saveEx(get_TrxName());
|
||||||
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
|
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
|
||||||
|
|
||||||
|
@ -2417,7 +2426,10 @@ public final class MPayment extends X_C_Payment
|
||||||
if (!aLine.save(get_TrxName()))
|
if (!aLine.save(get_TrxName()))
|
||||||
log.warning("Automatic allocation - reversal line not saved");
|
log.warning("Automatic allocation - reversal line not saved");
|
||||||
}
|
}
|
||||||
alloc.processIt(DocAction.ACTION_Complete);
|
// added AdempiereException by Amir Sehan
|
||||||
|
if (!alloc.processIt(DocAction.ACTION_Complete))
|
||||||
|
throw new AdempiereException("Failed Processing Document - " + alloc);
|
||||||
|
// end added
|
||||||
alloc.saveEx(get_TrxName());
|
alloc.saveEx(get_TrxName());
|
||||||
//
|
//
|
||||||
StringBuffer info = new StringBuffer (reversal.getDocumentNo());
|
StringBuffer info = new StringBuffer (reversal.getDocumentNo());
|
||||||
|
|
Loading…
Reference in New Issue