[fix] formatters

This commit is contained in:
Rushabh Mehta 2017-07-18 22:08:31 +05:30
parent d662f92851
commit 124c069819
2 changed files with 3 additions and 3 deletions

View file

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

View file

@ -473,7 +473,7 @@ frappe.ui.Filter = Class.extend({
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
// __("like"), __("not like"), __("in")