(function(){ "use strict"; /* --------------------------------------------------------------------- * [unFormatAmountCurrency] * Description: Format currency to number. * Written by Robert Gauto. * --------------------------------------------------------------------*/ openerp.web.unFormatCurrency = function () { return function(value) { value = value.replace(/[\.|,](\d{0,2}$)/, '?$1').split(/\?/) value[0] = value[0].replace(/[^0-9]/g, '') value = Number.parseFloat(value.join('.')) || 0 return value } }() })();