Completing return message when raise AdempiereException
This commit is contained in:
parent
bdc3e826c7
commit
575dbf64cd
|
@ -155,9 +155,9 @@ public class MCashLine extends X_C_CashLine
|
|||
{
|
||||
saveEx(trxName);
|
||||
order.setC_CashLine_ID(getC_CashLine_ID());
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by Zuhri
|
||||
if (!order.processIt(MOrder.ACTION_WaitComplete))
|
||||
throw new AdempiereException("Failed processing Document - " + order);
|
||||
throw new AdempiereException("Failed when processing document - " + order.getProcessMsg());
|
||||
// end added
|
||||
order.saveEx(trxName);
|
||||
// Set Invoice
|
||||
|
|
|
@ -1684,9 +1684,9 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
log.fine(dropShipment.toString());
|
||||
|
||||
dropShipment.setDocAction(DocAction.ACTION_Complete);
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by Zuhri
|
||||
if (!dropShipment.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("Failed Processing Document - " + dropShipment);
|
||||
throw new AdempiereException("Failed when processing document - " + dropShipment.getProcessMsg());
|
||||
// end added
|
||||
dropShipment.saveEx();
|
||||
|
||||
|
@ -1906,9 +1906,9 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
if (counterDT.getDocAction() != null)
|
||||
{
|
||||
counter.setDocAction(counterDT.getDocAction());
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!counter.processIt(counterDT.getDocAction()))
|
||||
throw new AdempiereException("Failed Processing Document - " + counter);
|
||||
throw new AdempiereException("Failed when processing document - " + counter.getProcessMsg());
|
||||
// end added
|
||||
counter.saveEx(get_TrxName());
|
||||
}
|
||||
|
|
|
@ -2027,9 +2027,9 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
if (counterDT.getDocAction() != null)
|
||||
{
|
||||
counter.setDocAction(counterDT.getDocAction());
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!counter.processIt(counterDT.getDocAction()))
|
||||
throw new AdempiereException("Failed Processing Document - " + counter);
|
||||
throw new AdempiereException("Failed when processing document - " + counter.getProcessMsg());
|
||||
// end added
|
||||
counter.saveEx(get_TrxName());
|
||||
}
|
||||
|
@ -2271,9 +2271,9 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
Env.ZERO, Env.ZERO, Env.ZERO);
|
||||
rLine.setC_Invoice_ID(reversal.getC_Invoice_ID());
|
||||
rLine.saveEx();
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!alloc.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("Failed Processing Document - " + alloc);
|
||||
throw new AdempiereException("Failed when processing document - " + alloc.getProcessMsg());
|
||||
// end added
|
||||
alloc.saveEx();
|
||||
}
|
||||
|
|
|
@ -474,9 +474,9 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
|
|||
;
|
||||
else
|
||||
{
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!journal.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("Failed Processing Document - " + journal);
|
||||
throw new AdempiereException("Failed when processing document - " + journal.getProcessMsg());
|
||||
// end added
|
||||
journal.saveEx();
|
||||
if (!DocAction.STATUS_Completed.equals(journal.getDocStatus()))
|
||||
|
|
|
@ -1898,9 +1898,9 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
return null;
|
||||
}
|
||||
}
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!shipment.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("Failed Processing Document - " + shipment);
|
||||
throw new AdempiereException("Failed when processing document - " + shipment.getProcessMsg());
|
||||
// end added
|
||||
shipment.saveEx(get_TrxName());
|
||||
if (!DOCSTATUS_Completed.equals(shipment.getDocStatus()))
|
||||
|
@ -2001,9 +2001,9 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
}
|
||||
}
|
||||
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!invoice.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("Failed Processing Document - " + invoice);
|
||||
throw new AdempiereException("Failed when processing document - " + invoice.getProcessMsg());
|
||||
// end added
|
||||
invoice.saveEx(get_TrxName());
|
||||
setC_CashLine_ID(invoice.getC_CashLine_ID());
|
||||
|
@ -2088,9 +2088,9 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
if (counterDT.getDocAction() != null)
|
||||
{
|
||||
counter.setDocAction(counterDT.getDocAction());
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!counter.processIt(counterDT.getDocAction()))
|
||||
throw new AdempiereException("Failed Processing Document - " + counter);
|
||||
throw new AdempiereException("Failed when processing document - " + counter.getProcessMsg());
|
||||
// end added
|
||||
counter.saveEx(get_TrxName());
|
||||
}
|
||||
|
|
|
@ -327,9 +327,9 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck
|
|||
{
|
||||
check.setC_Payment_ID (C_Payment_ID);
|
||||
check.saveEx(); // Payment process needs it
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!payment.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("FAiled Processing Document - " + payment);
|
||||
throw new AdempiereException("Failed when processing document - " + payment.getProcessMsg());
|
||||
// end added
|
||||
if (!payment.save())
|
||||
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
|
||||
|
|
|
@ -1659,9 +1659,9 @@ public final class MPayment extends X_C_Payment
|
|||
order.setC_Payment_ID(getC_Payment_ID());
|
||||
order.setDocAction(X_C_Order.DOCACTION_WaitComplete);
|
||||
order.set_TrxName(get_TrxName());
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!order.processIt (X_C_Order.DOCACTION_WaitComplete))
|
||||
throw new AdempiereException("Failed Processing Document - " + order);
|
||||
throw new AdempiereException("Failed when processing document - " + order.getProcessMsg());
|
||||
// end added
|
||||
m_processMsg = order.getProcessMsg();
|
||||
order.saveEx(get_TrxName());
|
||||
|
@ -1993,9 +1993,9 @@ public final class MPayment extends X_C_Payment
|
|||
if (counterDT.getDocAction() != null)
|
||||
{
|
||||
counter.setDocAction(counterDT.getDocAction());
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!counter.processIt(counterDT.getDocAction()))
|
||||
throw new AdempiereException("Failed Processing DOcument - " + counter);
|
||||
throw new AdempiereException("Failed when rocessing document - " + counter.getProcessMsg());
|
||||
// end added
|
||||
counter.saveEx(get_TrxName());
|
||||
}
|
||||
|
@ -2060,9 +2060,9 @@ public final class MPayment extends X_C_Payment
|
|||
pa.saveEx();
|
||||
}
|
||||
}
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!alloc.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("Failed Processing Document - " + alloc);
|
||||
throw new AdempiereException("Failed when processing document - " + alloc.getProcessMsg());
|
||||
// end added
|
||||
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
|
||||
return alloc.save(get_TrxName());
|
||||
|
@ -2095,9 +2095,9 @@ public final class MPayment extends X_C_Payment
|
|||
aLine.setDocInfo(getC_BPartner_ID(), 0, getC_Invoice_ID());
|
||||
aLine.setC_Payment_ID(getC_Payment_ID());
|
||||
aLine.saveEx(get_TrxName());
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!alloc.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("Failed Processing Document - " + alloc);
|
||||
throw new AdempiereException("Failed when processing document - " + alloc.getProcessMsg());
|
||||
// end added
|
||||
alloc.saveEx(get_TrxName());
|
||||
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
|
||||
|
@ -2192,8 +2192,12 @@ public final class MPayment extends X_C_Payment
|
|||
}
|
||||
else
|
||||
{
|
||||
alloc.processIt(DocAction.ACTION_Complete);
|
||||
ok = alloc.save(get_TrxName());
|
||||
// added Adempiere Exception by zuhri
|
||||
if(alloc.processIt(DocAction.ACTION_Complete))
|
||||
ok = alloc.save(get_TrxName());
|
||||
else
|
||||
throw new AdempiereException("Failed when processing document - " + alloc.getProcessMsg());
|
||||
// end added by zuhri
|
||||
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
|
||||
}
|
||||
return ok;
|
||||
|
@ -2426,9 +2430,9 @@ public final class MPayment extends X_C_Payment
|
|||
if (!aLine.save(get_TrxName()))
|
||||
log.warning("Automatic allocation - reversal line not saved");
|
||||
}
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!alloc.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("Failed Processing Document - " + alloc);
|
||||
throw new AdempiereException("Failed when processing document - " + alloc.getProcessMsg());
|
||||
// end added
|
||||
alloc.saveEx(get_TrxName());
|
||||
//
|
||||
|
|
|
@ -498,9 +498,9 @@ public class MRMA extends X_M_RMA implements DocAction
|
|||
if (counterDT.getDocAction() != null)
|
||||
{
|
||||
counter.setDocAction(counterDT.getDocAction());
|
||||
// added AdempiereException by Amir Sehan
|
||||
// added AdempiereException by zuhri
|
||||
if (!counter.processIt(counterDT.getDocAction()))
|
||||
throw new AdempiereException("Failed Processing Document - " + counter);
|
||||
throw new AdempiereException("Failed when processing document - " + counter.getProcessMsg());
|
||||
// end added
|
||||
counter.saveEx(get_TrxName());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue