public void updateQuantity(ItemBean original,ItemBean itemToAdd,boolean add){
  BigDecimal originalQuantity=original.getQty();
  BigDecimal quantityToAdd=itemToAdd.getQty();
  BigDecimal finalQuantity=null;
  if (!add)   finalQuantity=originalQuantity.subtract(quantityToAdd);
 else   finalQuantity=originalQuantity.add(quantityToAdd);
  original.setQty(finalQuantity);
}

public void updateQuantity ( ItemBean original , ItemBean itemToAdd , boolean add ) { BigDecimal originalQuantity = original . getQty ( ) ; BigDecimal quantityToAdd = itemToAdd . getQty ( ) ; BigDecimal finalQuantity = null ; if ( ! add ) finalQuantity = originalQuantity . subtract ( quantityToAdd ) ; else finalQuantity = originalQuantity . add ( quantityToAdd ) ; original . setQty ( finalQuantity ) ; }
update quantity in order
