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

@@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:16",
"creation": "2013-01-22 15:11:38",
"docstatus": 0,
"modified": "2013-01-22 14:55:57",
"modified": "2013-01-23 17:00:25",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -150,7 +150,7 @@
{
"doctype": "DocField",
"fieldname": "total_cost",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Total Cost",
"read_only": 1
},
@@ -162,14 +162,14 @@
{
"doctype": "DocField",
"fieldname": "raw_material_cost",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Total Raw Material Cost",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "operating_cost",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Total Operating Cost",
"read_only": 1
},

View File

@@ -36,8 +36,7 @@ wn.doclistviews['BOM'] = wn.views.ListView.extend({
{
width: '20%',
content: function(parent, data) {
$(parent).html(sys_defaults.currency + " "
+ fmt_money(data.total_cost));
$(parent).html(format_currency(data.total_cost));
},
css: {'text-align': 'right'},
},

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"modified": "2013-01-22 14:18:20",
"modified": "2013-01-23 16:43:10",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -65,7 +65,7 @@
{
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Amount",
"oldfieldname": "amount_as_per_sr",
"oldfieldtype": "Currency"

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"modified": "2013-01-22 14:55:58",
"modified": "2013-01-23 16:43:11",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -99,7 +99,7 @@
{
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Amount",
"oldfieldname": "amount_as_per_mar",
"oldfieldtype": "Currency",

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"modified": "2013-01-22 14:55:58",
"modified": "2013-01-23 16:43:12",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -68,7 +68,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate",
"oldfieldname": "hour_rate",
"oldfieldtype": "Currency",
@@ -87,7 +87,7 @@
"allow_on_submit": 0,
"doctype": "DocField",
"fieldname": "operating_cost",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Operating Cost",
"oldfieldname": "operating_cost",
"oldfieldtype": "Currency",

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"
},
@@ -72,6 +72,7 @@
"fieldname": "grand_total",
"fieldtype": "Currency",
"label": "Grand Total",
"options": "eval:erpnext.get_currency()",
"read_only": 1,
"width": "120px"
},

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:17",
"docstatus": 0,
"modified": "2013-01-22 14:50:39",
"modified": "2013-01-23 16:43:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -102,7 +102,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate_labour",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate Labour",
"oldfieldname": "hour_rate_labour",
"oldfieldtype": "Currency",
@@ -118,7 +118,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate_electricity",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate Electricity",
"oldfieldname": "hour_rate_electricity",
"oldfieldtype": "Currency"
@@ -126,7 +126,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate_consumable",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate Consumable",
"oldfieldname": "hour_rate_consumable",
"oldfieldtype": "Currency"
@@ -134,7 +134,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate_rent",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate Rent",
"oldfieldname": "hour_rate_rent",
"oldfieldtype": "Currency"
@@ -142,7 +142,7 @@
{
"doctype": "DocField",
"fieldname": "overhead",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Overhead",
"oldfieldname": "overhead",
"oldfieldtype": "Currency",
@@ -158,7 +158,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate",
"oldfieldname": "hour_rate",
"oldfieldtype": "Currency",