public static String formatQuantity(BigDecimal quantity){
  if (quantity == null)   return "";
 else   return quantityDecimalFormat.format(quantity);
}

public static String formatQuantity ( BigDecimal quantity ) { if ( quantity == null ) return "" ; else return quantityDecimalFormat . format ( quantity ) ; }
formats an bigdecimal representing a quantity into a string
