public WebBasketLine add(int M_Product_ID,String Name,BigDecimal Qty,BigDecimal Price){
  for (int i=0; i < m_lines.size(); i++) {
    WebBasketLine wbl=(WebBasketLine)m_lines.get(i);
    if (wbl.getM_Product_ID() == M_Product_ID) {
      wbl.addQuantity(Qty);
      getTotal(true);
      return wbl;
    }
  }
  WebBasketLine wbl=new WebBasketLine(M_Product_ID,Name,Qty,Price);
  return add(wbl);
}

public WebBasketLine add ( int M_Product_ID , String Name , BigDecimal Qty , BigDecimal Price ) { for ( int i = 0 ; i < m_lines . size ( ) ; i ++ ) { WebBasketLine wbl = ( WebBasketLine ) m_lines . get ( i ) ; if ( wbl . getM_Product_ID ( ) == M_Product_ID ) { wbl . addQuantity ( Qty ) ; getTotal ( true ) ; return wbl ; } } WebBasketLine wbl = new WebBasketLine ( M_Product_ID , Name , Qty , Price ) ; return add ( wbl ) ; }
add line . adds qty to the line , if same product
