diff --git a/org.adempiere.base/src/org/compiere/model/MCashLine.java b/org.adempiere.base/src/org/compiere/model/MCashLine.java index ccb3247515..089492f502 100644 --- a/org.adempiere.base/src/org/compiere/model/MCashLine.java +++ b/org.adempiere.base/src/org/compiere/model/MCashLine.java @@ -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 diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index 3692c07ac6..691a22ff85 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -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()); } diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index 60db8b2ee4..2efa911cdb 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -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(); } diff --git a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java index 40d749b885..f9085c4a67 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java +++ b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java @@ -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())) diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index 2c60b41a20..bac0dab99e 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -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()); } diff --git a/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java b/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java index 8b1bf6ee5f..cd4427dd57 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java +++ b/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java @@ -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); diff --git a/org.adempiere.base/src/org/compiere/model/MPayment.java b/org.adempiere.base/src/org/compiere/model/MPayment.java index 8d1c01f583..9fb2561f90 100644 --- a/org.adempiere.base/src/org/compiere/model/MPayment.java +++ b/org.adempiere.base/src/org/compiere/model/MPayment.java @@ -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()); // diff --git a/org.adempiere.base/src/org/compiere/model/MRMA.java b/org.adempiere.base/src/org/compiere/model/MRMA.java index 2c008b7273..448ed3d2ff 100644 --- a/org.adempiere.base/src/org/compiere/model/MRMA.java +++ b/org.adempiere.base/src/org/compiere/model/MRMA.java @@ -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()); }