exception handling processIt on ExpenseAPInvoice.java

This commit is contained in:
Edwin Ang 2012-04-09 15:04:46 +07:00
parent bf4464cb9e
commit 4f5cefbff2
1 changed files with 5 additions and 1 deletions

View File

@ -212,7 +212,11 @@ public class ExpenseAPInvoice extends SvrProcess
if (invoice == null)
return;
invoice.setDocAction(DocAction.ACTION_Prepare);
invoice.processIt(DocAction.ACTION_Prepare);
if (!invoice.processIt(DocAction.ACTION_Prepare)) {
log.warning("Invoice Process Failed: " + invoice + " - " + invoice.getProcessMsg());
throw new IllegalStateException("Invoice Process Failed: " + invoice + " - " + invoice.getProcessMsg());
}
if (!invoice.save())
new IllegalStateException("Cannot save Invoice");
//