exception handling processIt on MOrder
This commit is contained in:
parent
6e1c0ba027
commit
797af7b6b8
|
@ -30,6 +30,9 @@ import java.util.Vector;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import javax.mail.internet.AddressException;
|
||||||
|
|
||||||
|
import org.adempiere.exceptions.AdempiereException;
|
||||||
import org.adempiere.exceptions.BPartnerNoBillToAddressException;
|
import org.adempiere.exceptions.BPartnerNoBillToAddressException;
|
||||||
import org.adempiere.exceptions.BPartnerNoShipToAddressException;
|
import org.adempiere.exceptions.BPartnerNoShipToAddressException;
|
||||||
import org.adempiere.exceptions.FillMandatoryException;
|
import org.adempiere.exceptions.FillMandatoryException;
|
||||||
|
@ -1895,8 +1898,10 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Manually Process Shipment
|
// added AdempiereException by Amir Sehan
|
||||||
shipment.processIt(DocAction.ACTION_Complete);
|
if (!shipment.processIt(DocAction.ACTION_Complete))
|
||||||
|
throw new AdempiereException("Failed Processing Document - " + shipment);
|
||||||
|
// end added
|
||||||
shipment.saveEx(get_TrxName());
|
shipment.saveEx(get_TrxName());
|
||||||
if (!DOCSTATUS_Completed.equals(shipment.getDocStatus()))
|
if (!DOCSTATUS_Completed.equals(shipment.getDocStatus()))
|
||||||
{
|
{
|
||||||
|
@ -1996,8 +2001,10 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manually Process Invoice
|
// added AdempiereException by Amir Sehan
|
||||||
invoice.processIt(DocAction.ACTION_Complete);
|
if (!invoice.processIt(DocAction.ACTION_Complete))
|
||||||
|
throw new AdempiereException("Failed Processing Document - " + invoice);
|
||||||
|
// end added
|
||||||
invoice.saveEx(get_TrxName());
|
invoice.saveEx(get_TrxName());
|
||||||
setC_CashLine_ID(invoice.getC_CashLine_ID());
|
setC_CashLine_ID(invoice.getC_CashLine_ID());
|
||||||
if (!DOCSTATUS_Completed.equals(invoice.getDocStatus()))
|
if (!DOCSTATUS_Completed.equals(invoice.getDocStatus()))
|
||||||
|
@ -2081,7 +2088,10 @@ public class MOrder extends X_C_Order 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue