fix: comma in rate field not changing to dot for the number format #.###,##

This commit is contained in:
Rohit Waghchaure 2019-10-09 13:07:32 +05:30
parent e9e2a89dc8
commit 567d7285ce

View file

@ -1,5 +1,10 @@
frappe.ui.form.ControlCurrency = frappe.ui.form.ControlFloat.extend({
eval_expression: function(value) {
if (typeof value === 'string' && value.includes(',')
&& frappe.sys_defaults.number_format.startsWith("#.")) {
return value;
}
if (typeof value === 'string'
&& value.match(/^[0-9+-/* ]+$/)) {
if (value.includes(',')) {