浏览代码

[fix] formatters

version-14
Rushabh Mehta 8 年前
父节点
当前提交
124c069819
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. +2
    -2
      frappe/public/js/frappe/form/formatters.js
  2. +1
    -1
      frappe/public/js/frappe/ui/filters/filters.js

+ 2
- 2
frappe/public/js/frappe/form/formatters.js 查看文件

@@ -66,7 +66,7 @@ frappe.form.formatters = {
} }
value = (value==null || value==="") ? value = (value==null || value==="") ?
"" : format_currency(value, currency, precision); "" : format_currency(value, currency, precision);
if (options && options.for_print) {
if (options && options.only_value) {
return value; return value;
} else { } else {
return frappe.form.formatters._right(value, options); return frappe.form.formatters._right(value, options);
@@ -86,7 +86,7 @@ frappe.form.formatters = {
value.replace(/^.(.*).$/, "$1"); value.replace(/^.(.*).$/, "$1");
} }


if(options && options.for_print) {
if(options && (options.for_print || options.only_value)) {
return value; return value;
} }




+ 1
- 1
frappe/public/js/frappe/ui/filters/filters.js 查看文件

@@ -473,7 +473,7 @@ frappe.ui.Filter = Class.extend({
value = {0:"No", 1:"Yes"}[cint(value)]; value = {0:"No", 1:"Yes"}[cint(value)];
} }


value = frappe.format(value, this.field.df, {for_print: 1});
value = frappe.format(value, this.field.df, {only_value: 1});


// for translations // for translations
// __("like"), __("not like"), __("in") // __("like"), __("not like"), __("in")


正在加载...
取消
保存