From ffbdd8f3ee48fcc0733859129822d67248bc239a Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 7 Dec 2009 21:16:29 +0000 Subject: [PATCH] BF [2910289] - More on RMA Stabilization https://sourceforge.net/tracker/?func=detail&aid=2910289&group_id=176962&atid=879332 --- base/src/org/compiere/model/MRMALine.java | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/base/src/org/compiere/model/MRMALine.java b/base/src/org/compiere/model/MRMALine.java index f266315a09..a5f0e47559 100644 --- a/base/src/org/compiere/model/MRMALine.java +++ b/base/src/org/compiere/model/MRMALine.java @@ -291,10 +291,29 @@ public class MRMALine extends X_M_RMALine return success; } - MRMA rma = new MRMA(getCtx(), getM_RMA_ID(), get_TrxName()); + MRMA rma = getParent(); rma.updateAmount(); - if (!rma.save()) + if (!rma.save(get_TrxName())) + { + throw new IllegalStateException("Could not update RMA grand total"); + } + + return true; + } + + @Override + protected boolean afterDelete(boolean success) + { + if (!success) + { + return success; + } + + MRMA rma = getParent(); + rma.updateAmount(); + + if (!rma.save(get_TrxName())) { throw new IllegalStateException("Could not update RMA grand total"); }