diff --git a/frappe/core/doctype/customize_form/customize_form.py b/frappe/core/doctype/customize_form/customize_form.py index 583e050389..1291ad4ffb 100644 --- a/frappe/core/doctype/customize_form/customize_form.py +++ b/frappe/core/doctype/customize_form/customize_form.py @@ -45,7 +45,7 @@ class CustomizeForm(Document): } allowed_fieldtype_change = (('Currency', 'Float', 'Percent'), ('Small Text', 'Data'), - ('Text', 'Text Editor', 'Code'), ('Data', 'Select')) + ('Text', 'Text Editor', 'Code'), ('Data', 'Select'), ('Text', 'Small Text')) def on_update(self): frappe.db.sql("delete from tabSingles where doctype='Customize Form'") diff --git a/frappe/core/doctype/customize_form_field/customize_form_field.json b/frappe/core/doctype/customize_form_field/customize_form_field.json index 8d094d8f8f..00a368ee2b 100644 --- a/frappe/core/doctype/customize_form_field/customize_form_field.json +++ b/frappe/core/doctype/customize_form_field/customize_form_field.json @@ -90,6 +90,7 @@ "width": "50px" }, { + "description": "Print Width of the field, if the field is a column in a table", "fieldname": "print_width", "fieldtype": "Data", "label": "Print Width", @@ -227,7 +228,7 @@ "idx": 1, "issingle": 0, "istable": 1, - "modified": "2014-05-26 03:22:36.704849", + "modified": "2014-08-05 08:30:34.887505", "modified_by": "Administrator", "module": "Core", "name": "Customize Form Field", diff --git a/frappe/core/doctype/docfield/docfield.json b/frappe/core/doctype/docfield/docfield.json index b1296d4056..001ff5f121 100644 --- a/frappe/core/doctype/docfield/docfield.json +++ b/frappe/core/doctype/docfield/docfield.json @@ -259,6 +259,7 @@ "width": "50px" }, { + "description": "Print Width of the field, if the field is a column in a table", "fieldname": "print_width", "fieldtype": "Data", "label": "Print Width", @@ -304,7 +305,7 @@ "in_dialog": 1, "issingle": 0, "istable": 1, - "modified": "2014-06-20 05:42:29.975498", + "modified": "2014-08-05 08:29:06.769568", "modified_by": "Administrator", "module": "Core", "name": "DocField", diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 8e876e8919..9c2f3e7cd7 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -294,10 +294,9 @@ def fmt_money(amount, precision=None, currency=None): amount = comma_str.join(parts) + ((precision and decimal_str) and (decimal_str + decimals) or "") amount = minus + amount - if currency: - symbol = frappe.db.get_value("Currency", currency, "symbol") - if symbol: - amount = symbol + " " + amount + if currency and frappe.defaults.get_global_default("hide_currency_symbol") != "Yes": + symbol = frappe.db.get_value("Currency", currency, "symbol") or currency + amount = symbol + " " + amount return amount