exception handling processIt on MPaySelectionCheck
This commit is contained in:
parent
332afbcb03
commit
ecd176e1ba
|
@ -24,6 +24,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.adempiere.exceptions.AdempiereException;
|
||||||
import org.compiere.process.DocAction;
|
import org.compiere.process.DocAction;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
|
@ -326,8 +327,10 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck
|
||||||
{
|
{
|
||||||
check.setC_Payment_ID (C_Payment_ID);
|
check.setC_Payment_ID (C_Payment_ID);
|
||||||
check.saveEx(); // Payment process needs it
|
check.saveEx(); // Payment process needs it
|
||||||
// Should start WF
|
// added AdempiereException by Amir Sehan
|
||||||
payment.processIt(DocAction.ACTION_Complete);
|
if (!payment.processIt(DocAction.ACTION_Complete))
|
||||||
|
throw new AdempiereException("FAiled Processing Document - " + payment);
|
||||||
|
// end added
|
||||||
if (!payment.save())
|
if (!payment.save())
|
||||||
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
|
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue