Integrate revision 11224

More on RMA Stabilization - - qty check is not taking account of other authorizations - add code to allow check on update also

Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2910289
This commit is contained in:
vpj-cd 2010-01-05 07:45:55 +00:00
parent 25596ca6c5
commit d8768c00f9
1 changed files with 2 additions and 2 deletions

View File

@ -288,8 +288,8 @@ public class MRMALine extends X_M_RMALine
return false;
}
BigDecimal totalQty = DB.getSQLValueBD(get_TrxName(),
"SELECT SUM(Qty) FROM M_RMALine rl JOIN M_RMA r ON (r.M_RMA_ID = rl.M_RMA_ID) WHERE M_InOutLine_ID = ? AND r.Processed = 'Y' AND r.DocStatus IN ('CO','CL')",
getM_InOutLine_ID());
"SELECT SUM(Qty) FROM M_RMALine rl JOIN M_RMA r ON (r.M_RMA_ID = rl.M_RMA_ID) WHERE M_InOutLine_ID = ? AND M_RMALine_ID != ? AND r.Processed = 'Y' AND r.DocStatus IN ('CO','CL')",
getM_InOutLine_ID(), getM_RMALine_ID());
if (totalQty == null)
totalQty = Env.ZERO;
totalQty = totalQty.add(getQty());