Browse Source

Merge pull request #8573 from rohitwaghchaure/fixed_rate_with_comma_not_changing_to_decimal

fix: comma in rate field not changing to dot for the number format #.###,##
version-14
rohitwaghchaure 5 years ago
committed by GitHub
parent
commit
ee14c0b721
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      frappe/public/js/frappe/form/controls/currency.js

+ 5
- 0
frappe/public/js/frappe/form/controls/currency.js 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(',')) {


Loading…
Cancel
Save