IDEMPIERE-2096 NPE compare BigDecimal when complete a "Customer Return" document

This commit is contained in:
Carlos Ruiz 2014-09-05 16:41:54 -05:00
parent e612a81fb8
commit b825c289b4
1 changed files with 2 additions and 0 deletions

View File

@ -1820,6 +1820,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;
}