Ver a proveniência

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 há 5 anos
committed by GitHub
ascendente
cometimento
ee14c0b721
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados ID da chave GPG: 4AEE18F83AFDEB23
1 ficheiros alterados com 5 adições e 0 eliminações
  1. +5
    -0
      frappe/public/js/frappe/form/controls/currency.js

+ 5
- 0
frappe/public/js/frappe/form/controls/currency.js Ver ficheiro

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

if (typeof value === 'string' if (typeof value === 'string'
&& value.match(/^[0-9+-/* ]+$/)) { && value.match(/^[0-9+-/* ]+$/)) {
if (value.includes(',')) { if (value.includes(',')) {


Carregando…
Cancelar
Guardar