package org.jpos.util;

import com.vaadin.data.converter.StringToBigDecimalConverter;

import java.text.NumberFormat;
import java.util.Locale;

public class AmountConverter extends StringToBigDecimalConverter {

    public AmountConverter(String errorMessage) {
        super(errorMessage);
    }

    @Override
    protected NumberFormat getFormat(Locale locale) {
        NumberFormat amountFormat = NumberFormat.getInstance();
        amountFormat.setGroupingUsed(true);
        amountFormat.setMinimumFractionDigits(2);
        return amountFormat;
    }

}

@@ -80,16 +80,48 @@
 erter;%0A%0A
+import java.text.DecimalFormat;%0A
 import j
@@ -549,16 +549,148 @@
 its(2);%0A
+        if (amountFormat instanceof DecimalFormat) %7B%0A            ((DecimalFormat) amountFormat).setParseBigDecimal(true);%0A        %7D%0A
         

Make parse method of NumberFormat always return a BigDecimal