From 367f50673bdf28566744f5722e92caa1054fa7d2 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 30 May 2016 22:29:09 -0500 Subject: [PATCH] IDEMPIERE-3078 IDEMPIERE-1770 created code for a non-existing column --- org.adempiere.base/src/org/compiere/model/MInOut.java | 7 ++----- .../src/org/compiere/model/MInOutLineMA.java | 8 +++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index c1bc584936..ab20a57dfd 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -1851,11 +1851,8 @@ public class MInOut extends X_M_InOut implements DocAction for(MInOutLineMA sMA : shipmentMAS){ BigDecimal lineMAQty = qtyToReturn; - BigDecimal qtyReturnable = (BigDecimal)sMA.get_Value(MInOutLineMA.COLUMNNAME_ReturnedQty); - if (qtyReturnable == null) - qtyReturnable = Env.ZERO; - if(lineMAQty.compareTo(qtyReturnable)>0){ - lineMAQty = qtyReturnable; + if(lineMAQty.compareTo(Env.ZERO)>0){ + lineMAQty = Env.ZERO; } MInOutLineMA ma = MInOutLineMA.addOrCreate(line, sMA.getM_AttributeSetInstance_ID(), lineMAQty, sMA.getDateMaterialPolicy(),true); diff --git a/org.adempiere.base/src/org/compiere/model/MInOutLineMA.java b/org.adempiere.base/src/org/compiere/model/MInOutLineMA.java index 71f879543c..8aa3526801 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOutLineMA.java +++ b/org.adempiere.base/src/org/compiere/model/MInOutLineMA.java @@ -43,12 +43,11 @@ public class MInOutLineMA extends X_M_InOutLineMA /** * */ - private static final long serialVersionUID = -4131812777103744727L; - + private static final long serialVersionUID = -2610075295914545809L; + /** Log */ private static CLogger s_log = CLogger.getCLogger (MInOutLineMA.class); - public static String COLUMNNAME_ReturnedQty ="returnedQty"; - + /** * Get Material Allocations for Line * @param ctx context @@ -237,7 +236,6 @@ public class MInOutLineMA extends X_M_InOutLineMA while (rs.next()) { MInOutLineMA lineMA = new MInOutLineMA(ctx, rs, trxName); - lineMA.set_Value(COLUMNNAME_ReturnedQty, rs.getBigDecimal(COLUMNNAME_ReturnedQty)); list.add(lineMA); }