exception handling processIt on MCashLine

This commit is contained in:
uthadehikaru 2012-04-11 08:26:21 +07:00
parent 900a01ab7c
commit 1fe7383c47
1 changed files with 5 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -154,7 +155,10 @@ public class MCashLine extends X_C_CashLine
{
saveEx(trxName);
order.setC_CashLine_ID(getC_CashLine_ID());
order.processIt(MOrder.ACTION_WaitComplete);
// added AdempiereException by Amir Sehan
if (!order.processIt(MOrder.ACTION_WaitComplete))
throw new AdempiereException("Failed processing Document - " + order);
// end added
order.saveEx(trxName);
// Set Invoice
MInvoice[] invoices = order.getInvoices();