added format_currency and added options to all currency fields

This commit is contained in:
Rushabh Mehta
2013-01-23 19:39:51 +05:30
parent 6382a42dbe
commit 597d470e63
96 changed files with 804 additions and 604 deletions

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:17",
"docstatus": 0,
"modified": "2013-01-22 14:56:41",
"modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -196,6 +196,13 @@
"oldfieldtype": "Text Editor",
"search_index": 0
},
{
"doctype": "DocField",
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company"
},
{
"doctype": "DocField",
"fieldname": "project_details",
@@ -212,6 +219,7 @@
"no_copy": 0,
"oldfieldname": "project_value",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 0,
"search_index": 0
},
@@ -223,6 +231,7 @@
"no_copy": 0,
"oldfieldname": "est_material_cost",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"search_index": 0
},
{
@@ -241,6 +250,7 @@
"no_copy": 0,
"oldfieldname": "gross_margin_value",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 0,
"search_index": 0
},
@@ -252,6 +262,7 @@
"no_copy": 0,
"oldfieldname": "per_gross_margin",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 0,
"search_index": 0
},

View File

@@ -34,15 +34,14 @@ wn.doclistviews['Project'] = wn.views.ListView.extend({
{
width: '15%',
content: function(parent, data) {
$(parent).html(sys_defaults.currency + " "
+ fmt_money(data.project_value));
$(parent).html(format_currency(data.project_value));
},
css: {'text-align': 'right'},
},
{
width: '10%',
content: function(parent, data) {
$(parent).html(fmt_money(data.per_gross_margin) + " %");
$(parent).html(format_number(data.per_gross_margin) + " %");
},
css: {'text-align': 'right'},
},