private BigDecimal parsePrice(String price) {
DecimalFormatSymbols symbols = new DecimalFormatSymbols();
//symbols.setGroupingSeparator(',');
symbols.setDecimalSeparator('.');
String pattern = "#.##";
DecimalFormat decimalFormat = new DecimalFormat(pattern, symbols);
decimalFormat.setParseBigDecimal(true);
// parse the string
BigDecimal bigDecimal = null;
try {
bigDecimal = (BigDecimal) decimalFormat.parse(price);
}
catch (ParseException e) {
e.printStackTrace();
}
System.out.println(bigDecimal);
return bigDecimal;
}