| ';
+ var out='\
+ | ';
// main table
- out +=''+make_row('Net Total',fmt_money(convert_rate(doc.net_total)),1);
+ out +=''
+ +make_row('Net Total',convert_rate(doc.net_total),1);
// add rows
if(cl.length){
for(var i=0;i';
out += '| ';
diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt
index 18e5e0ad782..2b35a2d7663 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:08",
"docstatus": 0,
- "modified": "2013-01-22 16:55:23",
+ "modified": "2013-01-23 17:11:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -244,6 +244,7 @@
"label": "Net Total*",
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 0,
"read_only": 1,
"reqd": 1
@@ -413,6 +414,7 @@
"label": "Total Taxes and Charges",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -448,6 +450,7 @@
"label": "Grand Total",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 1,
@@ -460,6 +463,7 @@
"label": "Rounded Total",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -481,6 +485,7 @@
"label": "Total Advance",
"oldfieldname": "total_advance",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -492,6 +497,7 @@
"no_copy": 1,
"oldfieldname": "outstanding_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -510,6 +516,7 @@
"label": "Grand Total (Export)",
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 1
@@ -521,6 +528,7 @@
"label": "Rounded Total (Export)",
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"read_only": 1
},
@@ -541,13 +549,14 @@
"label": "Gross Profit",
"oldfieldname": "gross_profit",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "gross_profit_percent",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"label": "Gross Profit (%)",
"oldfieldname": "gross_profit_percent",
"oldfieldtype": "Currency",
@@ -573,6 +582,7 @@
"label": "Paid Amount",
"oldfieldname": "paid_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
@@ -603,6 +613,7 @@
"fieldname": "write_off_amount",
"fieldtype": "Currency",
"label": "Write Off Amount",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
@@ -1016,6 +1027,7 @@
"label": "Total Commission",
"oldfieldname": "total_commission",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
diff --git a/accounts/doctype/sales_invoice/sales_invoice_list.js b/accounts/doctype/sales_invoice/sales_invoice_list.js
index cbe1741ae3e..463350bb24f 100644
--- a/accounts/doctype/sales_invoice/sales_invoice_list.js
+++ b/accounts/doctype/sales_invoice/sales_invoice_list.js
@@ -32,7 +32,7 @@ wn.doclistviews['Sales Invoice'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
- $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_export))
+ $(parent).html(format_currency(data.grand_total_export, data.currency))
},
css: {'text-align':'right'}
},
diff --git a/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt b/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt
index dc035b51fe8..f7c3c5ac34e 100644
--- a/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt
+++ b/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:09",
"docstatus": 0,
- "modified": "2013-01-22 14:48:41",
+ "modified": "2013-01-23 17:11:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -55,6 +55,7 @@
"label": "Advance amount",
"oldfieldname": "advance_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1,
"width": "120px"
},
@@ -65,6 +66,7 @@
"label": "Allocated amount",
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"width": "120px"
},
{
diff --git a/accounts/doctype/sales_invoice_item/sales_invoice_item.txt b/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
index 9bf95984ad1..43685b2f16e 100644
--- a/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
+++ b/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:09",
"docstatus": 0,
- "modified": "2013-01-22 15:01:34",
+ "modified": "2013-01-23 17:11:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -99,6 +99,7 @@
"label": "Price List Rate",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"reqd": 0
},
@@ -118,6 +119,7 @@
"label": "Basic Rate",
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"reqd": 1
},
{
@@ -127,6 +129,7 @@
"label": "Amount",
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
+ "options": "currency",
"read_only": 1,
"reqd": 1
},
@@ -137,6 +140,7 @@
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -148,6 +152,7 @@
"label": "Basic Rate*",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"reqd": 1,
"search_index": 0
@@ -159,6 +164,7 @@
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 1
diff --git a/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt b/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
index 293a5a84423..f07606348f3 100644
--- a/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
+++ b/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:09",
"docstatus": 0,
- "modified": "2013-01-22 14:48:42",
+ "modified": "2013-01-23 17:11:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -69,7 +69,7 @@
{
"doctype": "DocField",
"fieldname": "rate",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
@@ -82,6 +82,7 @@
"label": "Amount",
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"reqd": 0
},
{
@@ -91,6 +92,7 @@
"label": "Total",
"oldfieldname": "total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@@ -134,6 +136,7 @@
"no_copy": 1,
"oldfieldname": "total_tax_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"report_hide": 1
},
@@ -147,6 +150,7 @@
"no_copy": 1,
"oldfieldname": "total_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"report_hide": 1
},
diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
index 16bf1bb6d97..7d441abd78f 100644
--- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
+++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
@@ -45,8 +45,8 @@ cur_frm.pformat.other_charges= function(doc){
var make_row = function(title,val,bold){
var bstart = ''; var bend = '';
return ' | | '+(bold?bstart:'')+title+(bold?bend:'')+' | '
- +''+doc.currency+' | '
- +''+val+' | '
+ +' | '
+ +''+format_currency(val, doc.currency)+' | '
+' '
}
@@ -73,24 +73,24 @@ cur_frm.pformat.other_charges= function(doc){
out +='';
if(!print_hide_dict['net_total']) {
- out +=make_row('Net Total',fmt_money(convert_rate(doc.net_total)),1);
+ out +=make_row('Net Total',convert_rate(doc.net_total),1);
}
// add rows
if(cl.length){
for(var i=0;i\
- '+ bal[0] + ' '
- + fmt_money(bal[1]) + '');
+ treenode.parent.append(''
+ + format_currency(bal[1], bal[0]) + '');
}
}
}
diff --git a/accounts/page/accounts_browser/accounts_browser.py b/accounts/page/accounts_browser/accounts_browser.py
index 4bcf7a40550..1a66fe3819a 100644
--- a/accounts/page/accounts_browser/accounts_browser.py
+++ b/accounts/page/accounts_browser/accounts_browser.py
@@ -1,6 +1,6 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import get_defaults, fmt_money
+from webnotes.utils import get_defaults
from accounts.utils import get_balance_on
@webnotes.whitelist()
diff --git a/accounts/page/financial_statements/financial_statements.js b/accounts/page/financial_statements/financial_statements.js
index 372f5aef515..2fd8afb5dbd 100644
--- a/accounts/page/financial_statements/financial_statements.js
+++ b/accounts/page/financial_statements/financial_statements.js
@@ -83,9 +83,11 @@ pscript.stmt_new = function(stmt,company_name,level,period,year) {
$i('stmt_tree').innerHTML = 'Refreshing....';
$i('stmt_tree').style.display = 'block';
+ var company = sel_val($i('stmt_company'))
+
var arg = {
statement:sel_val($i('stmt_type'))
- ,company:sel_val($i('stmt_company'))
+ ,company:company,
,period:sel_val($i('stmt_period'))
,year:sel_val($i('stmt_fiscal_year'))
}
@@ -136,9 +138,12 @@ pscript.stmt_new = function(stmt,company_name,level,period,year) {
}
if(nl[i][0] != 0){
if(nl[i][j]) {
- if (i==0) per.innerHTML = (nl[i][j]+'').bold();
- else if(nl[i][0] == 1 || nl[i][0] == 4) per.innerHTML = (cstr(fmt_money(nl[i][j]))+'').bold();
- else per.innerHTML = fmt_money(nl[i][j])
+ if (i==0)
+ per.innerHTML = (nl[i][j]+'').bold();
+ else if(nl[i][0] == 1 || nl[i][0] == 4)
+ per.innerHTML = format_currency(nl[i][j], erpnext.get_currency(company)).bold();
+ else
+ per.innerHTML = format_currency(nl[i][j], erpnext.get_currency(company))
} else
per.innerHTML = '-';
}
diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js
index fcb0b6ab3d1..bb513fca74e 100644
--- a/buying/doctype/purchase_common/purchase_common.js
+++ b/buying/doctype/purchase_common/purchase_common.js
@@ -242,8 +242,7 @@ erpnext.buying.BuyingController = erpnext.utils.Controller.extend({
},
get_company_currency: function() {
- return (wn.boot.company[this.frm.doc.company].default_currency ||
- sys_defaults['currency']);
+ return erpnext.get_currency(this.frm.doc.company);
}
});
@@ -648,9 +647,9 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname)
//prev_total += flt(tax[t].total_amount); // for previous row total
if(tax[t].charge_type == 'Actual')
- $td(otc,i+1,t+1).innerHTML = fmt_money(tax[t].total_amount);
+ $td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
else
- $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +fmt_money(tax[t].total_amount);
+ $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
if (tax[t].category != "Total"){
item_tax += tax[t].total_amount;
@@ -676,9 +675,9 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname)
//prev_total += flt(tax[t].total_amount); // for previous row total
if(tax[t].charge_type == 'Actual')
- $td(otc,i+1,t+1).innerHTML = fmt_money(tax[t].total_amount);
+ $td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
else
- $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +fmt_money(tax[t].total_amount);
+ $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
if (tax[t].category != "Total"){
item_tax -= tax[t].total_amount;
diff --git a/buying/doctype/purchase_order/purchase_order.txt b/buying/doctype/purchase_order/purchase_order.txt
index 0dd2a5322f8..eed812fa350 100644
--- a/buying/doctype/purchase_order/purchase_order.txt
+++ b/buying/doctype/purchase_order/purchase_order.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-22 15:11:37",
"docstatus": 0,
- "modified": "2013-01-22 16:55:21",
+ "modified": "2013-01-23 17:11:28",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -367,6 +367,7 @@
"no_copy": 0,
"oldfieldname": "net_total_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1
},
@@ -378,6 +379,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_added_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@@ -390,6 +392,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_deducted_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@@ -402,6 +405,7 @@
"no_copy": 0,
"oldfieldname": "grand_total_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@@ -431,6 +435,7 @@
"no_copy": 1,
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0
@@ -443,6 +448,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_added",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -454,6 +460,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_deducted",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -465,6 +472,7 @@
"no_copy": 1,
"oldfieldname": "total_tax",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -476,6 +484,7 @@
"no_copy": 1,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -486,6 +495,7 @@
"label": "Rounded Total",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
diff --git a/buying/doctype/purchase_order/purchase_order_list.js b/buying/doctype/purchase_order/purchase_order_list.js
index 762c63596a4..387d24dcebf 100644
--- a/buying/doctype/purchase_order/purchase_order_list.js
+++ b/buying/doctype/purchase_order/purchase_order_list.js
@@ -23,7 +23,7 @@ wn.doclistviews['Purchase Order'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
- $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_import))
+ $(parent).html(format_currency(data.grand_total_import, data.currency))
},
css: {'text-align':'right'}
},
diff --git a/buying/doctype/purchase_order_item/purchase_order_item.txt b/buying/doctype/purchase_order_item/purchase_order_item.txt
index 6e93ee679ca..de70973607f 100755
--- a/buying/doctype/purchase_order_item/purchase_order_item.txt
+++ b/buying/doctype/purchase_order_item/purchase_order_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:10",
"docstatus": 0,
- "modified": "2013-01-22 15:02:01",
+ "modified": "2013-01-23 17:11:19",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -116,6 +116,7 @@
"fieldname": "import_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate ",
+ "options": "currency",
"print_hide": 1
},
{
@@ -133,6 +134,7 @@
"label": "Rate ",
"oldfieldname": "import_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0
},
{
@@ -142,6 +144,7 @@
"label": "Amount",
"oldfieldname": "import_amount",
"oldfieldtype": "Currency",
+ "options": "currency",
"read_only": 1
},
{
@@ -149,6 +152,7 @@
"fieldname": "purchase_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate *",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
@@ -159,6 +163,7 @@
"label": "Rate (Default Curr.) *",
"oldfieldname": "purchase_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "100px",
"reqd": 1,
@@ -172,6 +177,7 @@
"label": "Amount (Default Curr.)",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 1
diff --git a/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt b/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt
index 742dbb8faf6..d78763e9630 100644
--- a/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt
+++ b/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:10",
"docstatus": 0,
- "modified": "2013-01-22 14:47:54",
+ "modified": "2013-01-23 17:11:19",
"modified_by": "Administrator",
"owner": "dhanalekshmi@webnotestech.com"
},
@@ -79,7 +79,8 @@
"fieldtype": "Currency",
"label": "Rate",
"oldfieldname": "rate",
- "oldfieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@@ -88,6 +89,7 @@
"label": "Amount",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
diff --git a/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt b/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt
index 7c36bba0799..f7a0f8ce10d 100644
--- a/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt
+++ b/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:10",
"docstatus": 0,
- "modified": "2013-01-22 14:47:55",
+ "modified": "2013-01-23 17:11:19",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@@ -97,7 +97,8 @@
"fieldtype": "Currency",
"label": "Rate",
"oldfieldname": "rate",
- "oldfieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@@ -116,6 +117,7 @@
"label": "Amount",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@@ -130,7 +132,7 @@
{
"doctype": "DocField",
"fieldname": "current_stock",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"label": "Current Stock",
"oldfieldname": "current_stock",
"oldfieldtype": "Currency",
diff --git a/buying/doctype/purchase_request/purchase_request.txt b/buying/doctype/purchase_request/purchase_request.txt
index e6fa16ea1ee..6d980538e1c 100644
--- a/buying/doctype/purchase_request/purchase_request.txt
+++ b/buying/doctype/purchase_request/purchase_request.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-21 18:19:20",
"docstatus": 0,
- "modified": "2013-01-22 14:56:44",
+ "modified": "2013-01-23 16:59:33",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -242,7 +242,7 @@
"description": "% of materials ordered against this Purchase Requisition",
"doctype": "DocField",
"fieldname": "per_ordered",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"label": "% Ordered",
"no_copy": 1,
"oldfieldname": "per_ordered",
diff --git a/buying/doctype/supplier_quotation/supplier_quotation.txt b/buying/doctype/supplier_quotation/supplier_quotation.txt
index 6b2970b894c..709e2cdc436 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.txt
+++ b/buying/doctype/supplier_quotation/supplier_quotation.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-21 18:19:20",
"docstatus": 0,
- "modified": "2013-01-22 16:55:26",
+ "modified": "2013-01-23 17:11:28",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -322,6 +322,7 @@
"no_copy": 0,
"oldfieldname": "net_total_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1
},
@@ -333,6 +334,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_added_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@@ -345,6 +347,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_deducted_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@@ -357,6 +360,7 @@
"no_copy": 0,
"oldfieldname": "grand_total_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@@ -386,6 +390,7 @@
"no_copy": 1,
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0
@@ -398,6 +403,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_added",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -409,6 +415,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_deducted",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -420,6 +427,7 @@
"no_copy": 1,
"oldfieldname": "total_tax",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -431,6 +439,7 @@
"no_copy": 1,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -441,6 +450,7 @@
"label": "Rounded Total",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
diff --git a/buying/doctype/supplier_quotation/supplier_quotation_list.js b/buying/doctype/supplier_quotation/supplier_quotation_list.js
index 60b1f5285df..e7e6a5b19d7 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation_list.js
+++ b/buying/doctype/supplier_quotation/supplier_quotation_list.js
@@ -20,7 +20,7 @@ wn.doclistviews['Supplier Quotation'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
- $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_import))
+ $(parent).html(format_currency(data.grand_total_import, data.currency))
},
css: {'text-align':'right'}
},
diff --git a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
index 4424da31b8c..44323791f41 100644
--- a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
+++ b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:12",
"docstatus": 0,
- "modified": "2013-01-22 14:50:08",
+ "modified": "2013-01-23 17:11:19",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -102,6 +102,7 @@
"fieldname": "import_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate ",
+ "options": "currency",
"print_hide": 1
},
{
@@ -119,6 +120,7 @@
"label": "Rate ",
"oldfieldname": "import_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0
},
{
@@ -128,6 +130,7 @@
"label": "Amount",
"oldfieldname": "import_amount",
"oldfieldtype": "Currency",
+ "options": "currency",
"read_only": 1
},
{
@@ -135,6 +138,7 @@
"fieldname": "purchase_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate *",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
@@ -145,6 +149,7 @@
"label": "Rate (Default Curr.) *",
"oldfieldname": "purchase_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "100px",
"reqd": 1,
@@ -158,6 +163,7 @@
"label": "Amount (Default Curr.)",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 1
diff --git a/hr/doctype/earning_type/earning_type.txt b/hr/doctype/earning_type/earning_type.txt
index 65a9393533e..18cac6821a2 100644
--- a/hr/doctype/earning_type/earning_type.txt
+++ b/hr/doctype/earning_type/earning_type.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:13",
"docstatus": 0,
- "modified": "2013-01-22 14:46:41",
+ "modified": "2013-01-23 16:32:07",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -81,7 +81,7 @@
"depends_on": "eval:doc.taxable=='No'",
"doctype": "DocField",
"fieldname": "exemption_limit",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"hidden": 1,
"label": "Exemption Limit",
"oldfieldname": "exemption_limit",
diff --git a/hr/doctype/employee_external_work_history/employee_external_work_history.txt b/hr/doctype/employee_external_work_history/employee_external_work_history.txt
index 85873205171..8c822efdcc3 100644
--- a/hr/doctype/employee_external_work_history/employee_external_work_history.txt
+++ b/hr/doctype/employee_external_work_history/employee_external_work_history.txt
@@ -1,75 +1,76 @@
[
{
- "owner": "Administrator",
+ "creation": "2013-01-10 16:34:14",
"docstatus": 0,
- "creation": "2012-07-03 13:29:41",
+ "modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
- "modified": "2012-11-30 11:57:58"
+ "owner": "Administrator"
},
{
- "istable": 1,
- "name": "__common__",
"doctype": "DocType",
- "module": "HR"
+ "istable": 1,
+ "module": "HR",
+ "name": "__common__"
},
{
+ "doctype": "DocField",
"name": "__common__",
"parent": "Employee External Work History",
- "doctype": "DocField",
+ "parentfield": "fields",
"parenttype": "DocType",
- "permlevel": 0,
- "parentfield": "fields"
+ "permlevel": 0
},
{
- "name": "Employee External Work History",
- "doctype": "DocType"
+ "doctype": "DocType",
+ "name": "Employee External Work History"
},
{
- "oldfieldtype": "Data",
"doctype": "DocField",
+ "fieldname": "company_name",
+ "fieldtype": "Data",
"label": "Company",
"oldfieldname": "company_name",
- "fieldname": "company_name",
- "fieldtype": "Data"
+ "oldfieldtype": "Data"
},
{
- "oldfieldtype": "Data",
"doctype": "DocField",
+ "fieldname": "designation",
+ "fieldtype": "Data",
"label": "Designation",
"oldfieldname": "designation",
- "fieldname": "designation",
- "fieldtype": "Data"
+ "oldfieldtype": "Data"
},
{
- "oldfieldtype": "Currency",
"doctype": "DocField",
+ "fieldname": "salary",
+ "fieldtype": "Currency",
"label": "Salary",
"oldfieldname": "salary",
- "fieldname": "salary",
- "fieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()"
},
{
- "oldfieldtype": "Small Text",
"doctype": "DocField",
+ "fieldname": "address",
+ "fieldtype": "Small Text",
"label": "Address",
"oldfieldname": "address",
- "fieldname": "address",
- "fieldtype": "Small Text"
+ "oldfieldtype": "Small Text"
},
{
- "oldfieldtype": "Data",
"doctype": "DocField",
+ "fieldname": "contact",
+ "fieldtype": "Data",
"label": "Contact",
"oldfieldname": "contact",
- "fieldname": "contact",
- "fieldtype": "Data"
+ "oldfieldtype": "Data"
},
{
- "oldfieldtype": "Data",
"doctype": "DocField",
+ "fieldname": "total_experience",
+ "fieldtype": "Data",
"label": "Total Experience",
"oldfieldname": "total_experience",
- "fieldname": "total_experience",
- "fieldtype": "Data"
+ "oldfieldtype": "Data"
}
]
\ No newline at end of file
diff --git a/hr/doctype/expense_claim/expense_claim.txt b/hr/doctype/expense_claim/expense_claim.txt
index a1331fa931a..ea52df871d7 100644
--- a/hr/doctype/expense_claim/expense_claim.txt
+++ b/hr/doctype/expense_claim/expense_claim.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:14",
"docstatus": 0,
- "modified": "2013-01-22 14:56:02",
+ "modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"owner": "harshada@webnotestech.com"
},
@@ -76,6 +76,7 @@
"no_copy": 1,
"oldfieldname": "total_claimed_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1,
"reqd": 0,
"width": "160px"
@@ -89,6 +90,7 @@
"no_copy": 1,
"oldfieldname": "total_sanctioned_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1,
"width": "160px"
},
diff --git a/hr/doctype/expense_claim/expense_claim_list.js b/hr/doctype/expense_claim/expense_claim_list.js
index 19d54278d4e..c3c81b12b42 100644
--- a/hr/doctype/expense_claim/expense_claim_list.js
+++ b/hr/doctype/expense_claim/expense_claim_list.js
@@ -17,8 +17,7 @@ wn.doclistviews['Expense Claim'] = wn.views.ListView.extend({
this._super(data);
data.posting_date = wn.datetime.str_to_user(data.posting_date);
data.employee_name = data.employee_name + ' claimed '
- + wn.boot.company[data.company].default_currency + ' '
- + fmt_money(data.total_claimed_amount);
+ + format_currency(data.total_claimed_amount, erpnext.get_currency(data.company));
},
columns: [
@@ -31,8 +30,8 @@ wn.doclistviews['Expense Claim'] = wn.views.ListView.extend({
{
width: '12%',
content: function(parent, data) {
- $(parent).html(wn.boot.company[data.company].default_currency
- + ' ' + fmt_money(data.total_sanctioned_amount));
+ $(parent).html(format_currency(data.total_sanctioned_amount,
+ erpnext.get_currency(data.company));
},
css: {'text-align': 'right'},
},
diff --git a/hr/doctype/expense_claim_detail/expense_claim_detail.txt b/hr/doctype/expense_claim_detail/expense_claim_detail.txt
index f28811f74ac..2d6a23c207a 100644
--- a/hr/doctype/expense_claim_detail/expense_claim_detail.txt
+++ b/hr/doctype/expense_claim_detail/expense_claim_detail.txt
@@ -1,80 +1,80 @@
[
{
- "owner": "harshada@webnotestech.com",
+ "creation": "2013-01-10 16:34:14",
"docstatus": 0,
- "creation": "2012-07-03 13:30:39",
+ "modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
- "modified": "2012-12-05 14:22:03"
+ "owner": "harshada@webnotestech.com"
},
{
- "istable": 1,
- "name": "__common__",
"doctype": "DocType",
- "module": "HR"
+ "istable": 1,
+ "module": "HR",
+ "name": "__common__"
},
{
+ "doctype": "DocField",
"name": "__common__",
"parent": "Expense Claim Detail",
- "doctype": "DocField",
+ "parentfield": "fields",
"parenttype": "DocType",
- "permlevel": 0,
- "parentfield": "fields"
+ "permlevel": 0
},
{
- "name": "Expense Claim Detail",
- "doctype": "DocType"
+ "doctype": "DocType",
+ "name": "Expense Claim Detail"
},
{
- "oldfieldtype": "Date",
"doctype": "DocField",
- "label": "Expense Date",
- "oldfieldname": "expense_date",
- "width": "150px",
"fieldname": "expense_date",
"fieldtype": "Date",
- "reqd": 0
+ "label": "Expense Date",
+ "oldfieldname": "expense_date",
+ "oldfieldtype": "Date",
+ "reqd": 0,
+ "width": "150px"
},
{
- "oldfieldtype": "Link",
"doctype": "DocField",
- "label": "Expense Claim Type",
- "oldfieldname": "expense_type",
- "width": "150px",
"fieldname": "expense_type",
"fieldtype": "Select",
+ "label": "Expense Claim Type",
+ "oldfieldname": "expense_type",
+ "oldfieldtype": "Link",
+ "options": "link:Expense Claim Type",
"reqd": 1,
- "options": "link:Expense Claim Type"
+ "width": "150px"
},
{
- "oldfieldtype": "Small Text",
"doctype": "DocField",
+ "fieldname": "description",
+ "fieldtype": "Small Text",
"label": "Description",
"oldfieldname": "description",
- "width": "300px",
- "fieldname": "description",
- "fieldtype": "Small Text"
+ "oldfieldtype": "Small Text",
+ "width": "300px"
},
{
- "oldfieldtype": "Currency",
"doctype": "DocField",
- "label": "Claim Amount",
- "oldfieldname": "claim_amount",
- "width": "150px",
- "trigger": "Client",
"fieldname": "claim_amount",
"fieldtype": "Currency",
- "reqd": 1
+ "label": "Claim Amount",
+ "oldfieldname": "claim_amount",
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
+ "reqd": 1,
+ "width": "150px"
},
{
- "no_copy": 1,
- "oldfieldtype": "Currency",
"allow_on_submit": 0,
"doctype": "DocField",
- "label": "Sanctioned Amount",
- "oldfieldname": "sanctioned_amount",
- "width": "150px",
- "trigger": "Client",
"fieldname": "sanctioned_amount",
- "fieldtype": "Currency"
+ "fieldtype": "Currency",
+ "label": "Sanctioned Amount",
+ "no_copy": 1,
+ "oldfieldname": "sanctioned_amount",
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
+ "width": "150px"
}
]
\ No newline at end of file
diff --git a/hr/doctype/salary_slip/salary_slip.txt b/hr/doctype/salary_slip/salary_slip.txt
index 5ab72040c24..0f68971c5ea 100644
--- a/hr/doctype/salary_slip/salary_slip.txt
+++ b/hr/doctype/salary_slip/salary_slip.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
- "modified": "2013-01-22 14:57:22",
+ "modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -325,7 +325,8 @@
"fieldtype": "Currency",
"label": "Arrear Amount",
"oldfieldname": "arrear_amount",
- "oldfieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@@ -333,7 +334,8 @@
"fieldtype": "Currency",
"label": "Leave Encashment Amount",
"oldfieldname": "encashment_amount",
- "oldfieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@@ -342,6 +344,7 @@
"label": "Gross Pay",
"oldfieldname": "gross_pay",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@@ -351,6 +354,7 @@
"label": "Total Deduction",
"oldfieldname": "total_deduction",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@@ -368,6 +372,7 @@
"label": "Net Pay",
"oldfieldname": "net_pay",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@@ -375,6 +380,7 @@
"fieldname": "rounded_total",
"fieldtype": "Currency",
"label": "Rounded Total",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
diff --git a/hr/doctype/salary_slip/salary_slip_list.js b/hr/doctype/salary_slip/salary_slip_list.js
index 0763e2792f7..dc0b83669de 100644
--- a/hr/doctype/salary_slip/salary_slip_list.js
+++ b/hr/doctype/salary_slip/salary_slip_list.js
@@ -33,13 +33,8 @@ wn.doclistviews['Salary Slip'] = wn.views.ListView.extend({
{
width: '16%',
content: function(parent, data) {
- $(parent).html(
- (
- data.company
- ? wn.boot.company[data.company].default_currency
- : sys_defaults.currency
- )
- + ' ' + fmt_money(data.rounded_total));
+ $(parent).html(format_currency(data.rounded_total,
+ erpnext.get_currency(data.company)));
},
css: {'text-align': 'right'},
},
diff --git a/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt b/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt
index 8586bf2d7fc..545fe94ab18 100644
--- a/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt
+++ b/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
- "modified": "2013-01-22 14:47:58",
+ "modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -55,13 +55,15 @@
"label": "Amount",
"oldfieldname": "d_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "d_modified_amount",
"fieldtype": "Currency",
- "label": "Modified Amount"
+ "label": "Modified Amount",
+ "options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
diff --git a/hr/doctype/salary_slip_earning/salary_slip_earning.txt b/hr/doctype/salary_slip_earning/salary_slip_earning.txt
index 5280cd83cc5..aafab56a529 100644
--- a/hr/doctype/salary_slip_earning/salary_slip_earning.txt
+++ b/hr/doctype/salary_slip_earning/salary_slip_earning.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
- "modified": "2013-01-22 14:47:59",
+ "modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -55,13 +55,15 @@
"label": "Amount",
"oldfieldname": "e_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "e_modified_amount",
"fieldtype": "Currency",
- "label": "Modified Amount"
+ "label": "Modified Amount",
+ "options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
diff --git a/hr/doctype/salary_structure/salary_structure.txt b/hr/doctype/salary_structure/salary_structure.txt
index 2800aeb24dd..e30d9a2d164 100644
--- a/hr/doctype/salary_structure/salary_structure.txt
+++ b/hr/doctype/salary_structure/salary_structure.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
- "modified": "2013-01-22 14:57:22",
+ "modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -155,6 +155,7 @@
"label": "CTC",
"oldfieldname": "ctc",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"reqd": 1
},
{
@@ -234,6 +235,7 @@
"label": "Total Earning",
"oldfieldname": "total_earning",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@@ -243,6 +245,7 @@
"label": "Total Deduction",
"oldfieldname": "total_deduction",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@@ -256,6 +259,7 @@
"fieldname": "net_pay",
"fieldtype": "Currency",
"label": "Net Pay",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
diff --git a/hr/doctype/salary_structure/salary_structure_list.js b/hr/doctype/salary_structure/salary_structure_list.js
index 77259b5d138..53182edf4b3 100644
--- a/hr/doctype/salary_structure/salary_structure_list.js
+++ b/hr/doctype/salary_structure/salary_structure_list.js
@@ -33,13 +33,8 @@ wn.doclistviews['Salary Structure'] = wn.views.ListView.extend({
{
width: '15%',
content: function(parent, data) {
- $(parent).html(
- (
- data.company
- ? wn.boot.company[data.company].default_currency
- : sys_defaults.currency
- )
- + ' ' + fmt_money(data.net_pay));
+ $(parent).html(format_currency(data.net_pay,
+ erpnext.get_currency(data.company)));
},
css: {'text-align': 'right'},
},
diff --git a/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt b/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt
index 1f4d246ae74..262cf95b4f7 100644
--- a/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt
+++ b/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt
@@ -1,59 +1,55 @@
[
{
- "owner": "Administrator",
+ "creation": "2013-01-10 16:34:16",
"docstatus": 0,
- "creation": "2012-03-27 14:35:54",
+ "modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
- "modified": "2012-03-27 14:35:54"
+ "owner": "Administrator"
},
{
- "section_style": "Simple",
+ "doctype": "DocType",
"istable": 1,
- "name": "__common__",
- "colour": "White:FFF",
"module": "HR",
- "show_in_menu": 0,
- "version": 14,
- "server_code_error": " ",
- "doctype": "DocType"
+ "name": "__common__"
},
{
+ "doctype": "DocField",
"name": "__common__",
"parent": "Salary Structure Deduction",
- "doctype": "DocField",
+ "parentfield": "fields",
"parenttype": "DocType",
- "permlevel": 0,
- "parentfield": "fields"
+ "permlevel": 0
},
{
- "name": "Salary Structure Deduction",
- "doctype": "DocType"
+ "doctype": "DocType",
+ "name": "Salary Structure Deduction"
},
{
- "oldfieldtype": "Select",
"doctype": "DocField",
- "label": "Type",
- "oldfieldname": "d_type",
- "width": "200px",
"fieldname": "d_type",
"fieldtype": "Link",
+ "label": "Type",
+ "oldfieldname": "d_type",
+ "oldfieldtype": "Select",
+ "options": "Deduction Type",
"reqd": 1,
- "options": "Deduction Type"
+ "width": "200px"
},
{
- "oldfieldtype": "Currency",
"doctype": "DocField",
+ "fieldname": "d_modified_amt",
+ "fieldtype": "Currency",
"label": "Amount",
"oldfieldname": "d_modified_amt",
- "fieldname": "d_modified_amt",
- "fieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()"
},
{
- "oldfieldtype": "Check",
"doctype": "DocField",
+ "fieldname": "depend_on_lwp",
+ "fieldtype": "Check",
"label": "Depend on LWP",
"oldfieldname": "depend_on_lwp",
- "fieldname": "depend_on_lwp",
- "fieldtype": "Check"
+ "oldfieldtype": "Check"
}
]
\ No newline at end of file
diff --git a/hr/doctype/salary_structure_earning/salary_structure_earning.txt b/hr/doctype/salary_structure_earning/salary_structure_earning.txt
index 93961d569f7..25d4294bb19 100644
--- a/hr/doctype/salary_structure_earning/salary_structure_earning.txt
+++ b/hr/doctype/salary_structure_earning/salary_structure_earning.txt
@@ -1,62 +1,57 @@
[
{
- "owner": "Administrator",
+ "creation": "2013-01-10 16:34:16",
"docstatus": 0,
- "creation": "2012-03-27 14:35:54",
+ "modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
- "modified": "2012-03-27 14:35:54"
+ "owner": "Administrator"
},
{
- "section_style": "Simple",
+ "doctype": "DocType",
+ "hide_heading": 0,
+ "hide_toolbar": 0,
"istable": 1,
"module": "HR",
- "doctype": "DocType",
- "show_in_menu": 0,
- "hide_heading": 0,
- "name": "__common__",
- "colour": "White:FFF",
- "server_code_error": " ",
- "version": 26,
- "hide_toolbar": 0
+ "name": "__common__"
},
{
+ "doctype": "DocField",
"name": "__common__",
"parent": "Salary Structure Earning",
- "doctype": "DocField",
+ "parentfield": "fields",
"parenttype": "DocType",
- "permlevel": 0,
- "parentfield": "fields"
+ "permlevel": 0
},
{
- "name": "Salary Structure Earning",
- "doctype": "DocType"
+ "doctype": "DocType",
+ "name": "Salary Structure Earning"
},
{
- "oldfieldtype": "Data",
"doctype": "DocField",
- "label": "Type",
- "oldfieldname": "e_type",
- "width": "200px",
"fieldname": "e_type",
"fieldtype": "Link",
+ "label": "Type",
+ "oldfieldname": "e_type",
+ "oldfieldtype": "Data",
+ "options": "Earning Type",
"reqd": 1,
- "options": "Earning Type"
+ "width": "200px"
},
{
- "oldfieldtype": "Currency",
"doctype": "DocField",
+ "fieldname": "modified_value",
+ "fieldtype": "Currency",
"label": "Amount",
"oldfieldname": "modified_value",
- "trigger": "Client",
- "fieldname": "modified_value",
- "fieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()"
},
{
- "oldfieldtype": "Check",
"doctype": "DocField",
+ "fieldname": "depend_on_lwp",
+ "fieldtype": "Check",
"label": "Depend on LWP",
"oldfieldname": "depend_on_lwp",
- "fieldname": "depend_on_lwp",
- "fieldtype": "Check"
+ "oldfieldtype": "Check"
}
]
\ No newline at end of file
diff --git a/manufacturing/doctype/bom/bom.txt b/manufacturing/doctype/bom/bom.txt
index dbf835cc635..c960494c37a 100644
--- a/manufacturing/doctype/bom/bom.txt
+++ b/manufacturing/doctype/bom/bom.txt
@@ -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
},
diff --git a/manufacturing/doctype/bom/bom_list.js b/manufacturing/doctype/bom/bom_list.js
index 8e355f38d79..59e34d0b915 100644
--- a/manufacturing/doctype/bom/bom_list.js
+++ b/manufacturing/doctype/bom/bom_list.js
@@ -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'},
},
diff --git a/manufacturing/doctype/bom_explosion_item/bom_explosion_item.txt b/manufacturing/doctype/bom_explosion_item/bom_explosion_item.txt
index 08ab2de6fea..fb0961141ce 100644
--- a/manufacturing/doctype/bom_explosion_item/bom_explosion_item.txt
+++ b/manufacturing/doctype/bom_explosion_item/bom_explosion_item.txt
@@ -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"
diff --git a/manufacturing/doctype/bom_item/bom_item.txt b/manufacturing/doctype/bom_item/bom_item.txt
index fd3c44d698b..1da7f0dc1a4 100644
--- a/manufacturing/doctype/bom_item/bom_item.txt
+++ b/manufacturing/doctype/bom_item/bom_item.txt
@@ -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",
diff --git a/manufacturing/doctype/bom_operation/bom_operation.txt b/manufacturing/doctype/bom_operation/bom_operation.txt
index c31c57af4f6..e722bbed727 100644
--- a/manufacturing/doctype/bom_operation/bom_operation.txt
+++ b/manufacturing/doctype/bom_operation/bom_operation.txt
@@ -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",
diff --git a/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt b/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt
index 193a041796f..de011dcb404 100644
--- a/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt
+++ b/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt
@@ -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"
},
diff --git a/manufacturing/doctype/workstation/workstation.txt b/manufacturing/doctype/workstation/workstation.txt
index cba3227a118..8dcb805b80d 100644
--- a/manufacturing/doctype/workstation/workstation.txt
+++ b/manufacturing/doctype/workstation/workstation.txt
@@ -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",
diff --git a/projects/doctype/project/project.txt b/projects/doctype/project/project.txt
index 2c277b2bc12..4d089bd02ec 100644
--- a/projects/doctype/project/project.txt
+++ b/projects/doctype/project/project.txt
@@ -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
},
diff --git a/projects/doctype/project/project_list.js b/projects/doctype/project/project_list.js
index 9adbe721f98..e0fc3786b36 100644
--- a/projects/doctype/project/project_list.js
+++ b/projects/doctype/project/project_list.js
@@ -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'},
},
diff --git a/projects/doctype/task/task.js b/projects/doctype/task/task.js
index 20629c5fbf8..472ca6b98cd 100644
--- a/projects/doctype/task/task.js
+++ b/projects/doctype/task/task.js
@@ -16,6 +16,8 @@
wn.provide("erpnext.projects");
+cur_frm.add_fetch("project", "company", "company");
+
erpnext.projects.Task = erpnext.utils.Controller.extend({
setup: function() {
this.frm.fields_dict.project.get_query = function() {
diff --git a/projects/doctype/task/task.txt b/projects/doctype/task/task.txt
index 8573b97d31a..96d6e41ce16 100644
--- a/projects/doctype/task/task.txt
+++ b/projects/doctype/task/task.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:17",
"docstatus": 0,
- "modified": "2013-01-22 14:57:26",
+ "modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -170,7 +170,8 @@
"fieldtype": "Currency",
"label": "Allocated Budget",
"oldfieldname": "allocated_budget",
- "oldfieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@@ -203,7 +204,8 @@
"fieldtype": "Currency",
"label": "Actual Budget",
"oldfieldname": "actual_budget",
- "oldfieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@@ -231,6 +233,18 @@
"oldfieldname": "closing_date",
"oldfieldtype": "Date"
},
+ {
+ "doctype": "DocField",
+ "fieldname": "column_break_22",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "label": "Company",
+ "options": "Company"
+ },
{
"doctype": "DocField",
"fieldname": "file_list",
diff --git a/public/js/utils.js b/public/js/utils.js
index 436c532d825..06d3a53c5d2 100644
--- a/public/js/utils.js
+++ b/public/js/utils.js
@@ -16,6 +16,15 @@
wn.provide('erpnext.utils');
+erpnext.get_currency = function(company) {
+ if(!company && cur_frm)
+ company = cur_frm.doc.company;
+ if(company)
+ return wn.boot.company[company].default_currency || wn.boot.sysdefaults.currency;
+ else
+ return wn.boot.sysdefaults.currency;
+}
+
// TODO
erpnext.utils.Controller = Class.extend({
init: function(opts) {
diff --git a/selling/doctype/customer/customer.txt b/selling/doctype/customer/customer.txt
index e859342ea63..a907bdac233 100644
--- a/selling/doctype/customer/customer.txt
+++ b/selling/doctype/customer/customer.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:18",
"docstatus": 0,
- "modified": "2013-01-22 16:54:47",
+ "modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -277,6 +277,7 @@
"label": "Credit Limit",
"oldfieldname": "credit_limit",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"permlevel": 2
},
{
diff --git a/selling/doctype/opportunity_item/opportunity_item.txt b/selling/doctype/opportunity_item/opportunity_item.txt
index 923546d291d..8d80e8b01f3 100644
--- a/selling/doctype/opportunity_item/opportunity_item.txt
+++ b/selling/doctype/opportunity_item/opportunity_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:19",
"docstatus": 0,
- "modified": "2013-01-22 13:41:28",
+ "modified": "2013-01-23 17:11:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -85,6 +85,7 @@
"label": "Basic Rate",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt
index 72bc7a76f69..ca788d4baad 100644
--- a/selling/doctype/quotation/quotation.txt
+++ b/selling/doctype/quotation/quotation.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:19",
"docstatus": 0,
- "modified": "2013-01-22 16:55:23",
+ "modified": "2013-01-23 17:11:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -242,6 +242,7 @@
"no_copy": 0,
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@@ -413,6 +414,7 @@
"label": "Taxes and Charges Total*",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -440,6 +442,7 @@
"no_copy": 0,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
@@ -453,6 +456,7 @@
"no_copy": 0,
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"width": "200px"
@@ -486,6 +490,7 @@
"no_copy": 0,
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@@ -499,6 +504,7 @@
"no_copy": 0,
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
diff --git a/selling/doctype/quotation/quotation_list.js b/selling/doctype/quotation/quotation_list.js
index 8530629a13d..55cbc1ddf01 100644
--- a/selling/doctype/quotation/quotation_list.js
+++ b/selling/doctype/quotation/quotation_list.js
@@ -31,7 +31,7 @@ wn.doclistviews['Quotation'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
- $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_export))
+ $(parent).html(format_currency(data.grand_total_export, data.currency))
},
css: {'text-align':'right'}
},
diff --git a/selling/doctype/quotation_item/quotation_item.txt b/selling/doctype/quotation_item/quotation_item.txt
index 13b99665af5..49f9b65a4cd 100644
--- a/selling/doctype/quotation_item/quotation_item.txt
+++ b/selling/doctype/quotation_item/quotation_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:19",
"docstatus": 0,
- "modified": "2013-01-22 14:47:57",
+ "modified": "2013-01-23 15:46:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -107,6 +107,7 @@
"label": "Price List Rate",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"reqd": 0,
"width": "100px"
@@ -131,6 +132,7 @@
"label": "Rate",
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -145,6 +147,7 @@
"label": "Amount",
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@@ -158,6 +161,7 @@
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency(cur_frm.doc.company);",
"print_hide": 1,
"read_only": 1,
"width": "100px"
@@ -171,6 +175,7 @@
"label": "Basic Rate*",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency(cur_frm.doc.company);",
"print_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -185,6 +190,7 @@
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency(cur_frm.doc.company);",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
diff --git a/selling/doctype/sales_and_purchase_return_item/sales_and_purchase_return_item.txt b/selling/doctype/sales_and_purchase_return_item/sales_and_purchase_return_item.txt
index 7cc64425de3..eb7bc297782 100644
--- a/selling/doctype/sales_and_purchase_return_item/sales_and_purchase_return_item.txt
+++ b/selling/doctype/sales_and_purchase_return_item/sales_and_purchase_return_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:20",
"docstatus": 0,
- "modified": "2013-01-22 14:47:59",
+ "modified": "2013-01-23 17:11:22",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@@ -63,6 +63,7 @@
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js
index 4ceac9e41d0..50b97a2b558 100644
--- a/selling/doctype/sales_common/sales_common.js
+++ b/selling/doctype/sales_common/sales_common.js
@@ -172,23 +172,28 @@ cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) {
unhide_field(['price_list_currency', 'plc_conversion_rate']);
if (pl_currency.length==1) {
- if (doc.price_list_currency != pl_currency[0]) set_multiple(cdt, cdn, {price_list_currency:pl_currency[0]});
+ if (doc.price_list_currency != pl_currency[0])
+ set_multiple(cdt, cdn, {price_list_currency:pl_currency[0]});
if (pl_currency[0] == doc.currency) {
- if(doc.plc_conversion_rate != doc.conversion_rate) set_multiple(cdt, cdn, {plc_conversion_rate:doc.conversion_rate});
+ if(doc.plc_conversion_rate != doc.conversion_rate)
+ set_multiple(cdt, cdn, {plc_conversion_rate:doc.conversion_rate});
hide_field(['price_list_currency', 'plc_conversion_rate']);
} else if (pl_currency[0] == r.message[1]) {
- if (doc.plc_conversion_rate != 1) set_multiple(cdt, cdn, {plc_conversion_rate:1})
+ if (doc.plc_conversion_rate != 1)
+ set_multiple(cdt, cdn, {plc_conversion_rate:1})
hide_field(['price_list_currency', 'plc_conversion_rate']);
}
}
if (r.message[1] == doc.currency) {
- if (doc.conversion_rate != 1) set_multiple(cdt, cdn, {conversion_rate:1});
+ if (doc.conversion_rate != 1)
+ set_multiple(cdt, cdn, {conversion_rate:1});
hide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']);
} else unhide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']);
if (r.message[1] == doc.price_list_currency) {
- if (doc.plc_conversion_rate != 1) set_multiple(cdt, cdn, {plc_conversion_rate:1});
+ if (doc.plc_conversion_rate != 1)
+ set_multiple(cdt, cdn, {plc_conversion_rate:1});
hide_field('plc_conversion_rate');
} else unhide_field('plc_conversion_rate');
@@ -573,9 +578,9 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname)
total += flt(tax[t].tax_amount); // for adding total to previous amount
if(tax[t].charge_type == 'Actual')
- $td(otc,i+1,t+1).innerHTML = fmt_money(tax[t].total_amount);
+ $td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
else
- $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +fmt_money(tax[t].total_amount);
+ $td(otc,i+1,t+1).innerHTML = '('+format_number(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
}
}
diff --git a/selling/doctype/sales_order/sales_order.js b/selling/doctype/sales_order/sales_order.js
index 607b132b9bb..55854b5b92a 100644
--- a/selling/doctype/sales_order/sales_order.js
+++ b/selling/doctype/sales_order/sales_order.js
@@ -27,8 +27,6 @@ wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_
wn.require('app/utilities/doctype/sms_control/sms_control.js');
-// ONLOAD
-// ================================================================================================
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()});
@@ -148,7 +146,6 @@ cur_frm.cscript.pull_quotation_details = function(doc,dt,dn) {
}
-//================ create new contact ============================================================================
cur_frm.cscript.new_contact = function(){
tn = wn.model.make_new_doc_and_get_name('Contact');
locals['Contact'][tn].is_customer = 1;
@@ -156,11 +153,6 @@ cur_frm.cscript.new_contact = function(){
loaddoc('Contact', tn);
}
-// DOCTYPE TRIGGERS
-// ================================================================================================
-
-
-// ***************** Get project name *****************
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
var cond = '';
if(doc.customer) cond = '(`tabProject`.customer = "'+doc.customer+'" OR IFNULL(`tabProject`.customer,"")="") AND';
@@ -171,20 +163,22 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
}
-// *************** Customized link query for QUOTATION *****************************
cur_frm.fields_dict['quotation_no'].get_query = function(doc) {
var cond='';
- if(doc.order_type) cond = ' ifnull(`tabQuotation`.order_type, "") = "'+doc.order_type+'" and';
- if(doc.customer) cond += ' ifnull(`tabQuotation`.customer, "") = "'+doc.customer+'" and';
+ if(doc.order_type) cond = ' ifnull(`tabQuotation`.order_type, "") = "'
+ +doc.order_type+'" and';
+ if(doc.customer) cond += ' ifnull(`tabQuotation`.customer, "") = "'
+ +doc.customer+'" and';
- return repl('SELECT DISTINCT name, customer, transaction_date FROM `tabQuotation` WHERE `tabQuotation`.company = "' + doc.company + '" and `tabQuotation`.`docstatus` = 1 and `tabQuotation`.status != "Order Lost" and %(cond)s `tabQuotation`.%(key)s LIKE "%s" ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond});
+ return repl('SELECT DISTINCT name, customer, transaction_date FROM `tabQuotation` \
+ WHERE `tabQuotation`.company = "'
+ + doc.company + '" and `tabQuotation`.`docstatus` = 1 \
+ and `tabQuotation`.status != "Order Lost" \
+ and %(cond)s `tabQuotation`.%(key)s LIKE "%s" \
+ ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond});
}
-// SALES ORDER DETAILS TRIGGERS
-// ================================================================================================
-
-// ***************** Get available qty in warehouse of item selected ****************
cur_frm.cscript.reserved_warehouse = function(doc, cdt , cdn) {
var d = locals[cdt][cdn];
if (d.reserved_warehouse) {
@@ -222,7 +216,6 @@ cur_frm.cscript['Make Maintenance Schedule'] = function() {
}
}
-//------------ make maintenance visit ------------
cur_frm.cscript.make_maintenance_visit = function() {
var doc = cur_frm.doc;
@@ -251,8 +244,6 @@ cur_frm.cscript.make_maintenance_visit = function() {
}
}
-// make indent
-// ================================================================================================
cur_frm.cscript['Make Purchase Request'] = function() {
var doc = cur_frm.doc;
if (doc.docstatus == 1) {
@@ -272,8 +263,6 @@ cur_frm.cscript['Make Purchase Request'] = function() {
}
-// MAKE DELIVERY NOTE
-// ================================================================================================
cur_frm.cscript['Make Delivery Note'] = function() {
var doc = cur_frm.doc;
if (doc.docstatus == 1) {
@@ -293,8 +282,6 @@ cur_frm.cscript['Make Delivery Note'] = function() {
}
-// MAKE SALES INVOICE
-// ================================================================================================
cur_frm.cscript['Make Sales Invoice'] = function() {
var doc = cur_frm.doc;
@@ -312,36 +299,36 @@ cur_frm.cscript['Make Sales Invoice'] = function() {
}
-// STOP SALES ORDER
-// ==================================================================================================
cur_frm.cscript['Stop Sales Order'] = function() {
var doc = cur_frm.doc;
var check = confirm("Are you sure you want to STOP " + doc.name);
if (check) {
- $c('runserverobj', args={'method':'stop_sales_order', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
+ $c('runserverobj', {
+ 'method':'stop_sales_order',
+ 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))
+ }, function(r,rt) {
cur_frm.refresh();
});
}
}
-// UNSTOP SALES ORDER
-// ==================================================================================================
cur_frm.cscript['Unstop Sales Order'] = function() {
var doc = cur_frm.doc;
var check = confirm("Are you sure you want to UNSTOP " + doc.name);
if (check) {
- $c('runserverobj', args={'method':'unstop_sales_order', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
+ $c('runserverobj', {
+ 'method':'unstop_sales_order',
+ 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))
+ }, function(r,rt) {
cur_frm.refresh();
});
}
}
-//get query select Territory
-//=======================================================================================================================
cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
}
@@ -350,4 +337,4 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(wn.boot.notification_settings.sales_order)) {
cur_frm.email_doc(wn.boot.notification_settings.sales_order_message);
}
-}
+};
\ No newline at end of file
diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt
index 159708c9056..1c543d45cb8 100644
--- a/selling/doctype/sales_order/sales_order.txt
+++ b/selling/doctype/sales_order/sales_order.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-22 15:24:17",
"docstatus": 0,
- "modified": "2013-01-22 16:55:24",
+ "modified": "2013-01-23 17:11:29",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -249,6 +249,7 @@
"label": "Net Total*",
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@@ -427,6 +428,7 @@
"label": "Taxes and Charges Total*",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"width": "150px"
@@ -454,6 +456,7 @@
"label": "Grand Total*",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
@@ -466,6 +469,7 @@
"label": "Rounded Total",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"width": "150px"
@@ -497,6 +501,7 @@
"label": "Grand Total (Export)",
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@@ -509,6 +514,7 @@
"label": "Rounded Total (Export)",
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"read_only": 1,
"width": "150px"
@@ -920,6 +926,7 @@
"label": "Total Commission",
"oldfieldname": "total_commission",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
diff --git a/selling/doctype/sales_order/sales_order_list.js b/selling/doctype/sales_order/sales_order_list.js
index a386f3537e0..16050c95f2d 100644
--- a/selling/doctype/sales_order/sales_order_list.js
+++ b/selling/doctype/sales_order/sales_order_list.js
@@ -24,7 +24,7 @@ wn.doclistviews['Sales Order'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
- $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_export))
+ $(parent).html(format_currency(data.grand_total_export, data.currency))
},
css: {'text-align':'right'}
},
diff --git a/selling/doctype/sales_order_item/sales_order_item.txt b/selling/doctype/sales_order_item/sales_order_item.txt
index bf2b37ddedf..b32e23f3924 100644
--- a/selling/doctype/sales_order_item/sales_order_item.txt
+++ b/selling/doctype/sales_order_item/sales_order_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:21",
"docstatus": 0,
- "modified": "2013-01-22 13:47:03",
+ "modified": "2013-01-23 17:11:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -101,6 +101,7 @@
"label": "Price List Rate",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"reqd": 0,
"width": "70px"
@@ -124,6 +125,7 @@
"label": "Rate",
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"reqd": 0,
"width": "100px"
},
@@ -136,6 +138,7 @@
"no_copy": 0,
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
+ "options": "currency",
"read_only": 1,
"reqd": 0,
"width": "100px"
@@ -147,6 +150,7 @@
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"width": "100px"
@@ -159,6 +163,7 @@
"label": "Basic Rate*",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"reqd": 0,
"width": "100px"
@@ -172,6 +177,7 @@
"no_copy": 0,
"oldfieldname": "amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
@@ -237,6 +243,7 @@
"fieldtype": "Currency",
"label": "Billed Amt",
"no_copy": 1,
+ "options": "currency",
"print_hide": 1,
"read_only": 1
},
diff --git a/selling/doctype/sales_team/sales_team.txt b/selling/doctype/sales_team/sales_team.txt
index 01f5260f57e..d57929f28f3 100644
--- a/selling/doctype/sales_team/sales_team.txt
+++ b/selling/doctype/sales_team/sales_team.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:22",
"docstatus": 0,
- "modified": "2013-01-22 13:47:40",
+ "modified": "2013-01-23 17:11:23",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -73,6 +73,7 @@
"label": "Allocated Amount",
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"reqd": 0,
"width": "120px"
},
@@ -94,6 +95,7 @@
"fieldtype": "Currency",
"label": "Incentives",
"oldfieldname": "incentives",
- "oldfieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()"
}
]
\ No newline at end of file
diff --git a/setup/doctype/authorization_rule/authorization_rule.txt b/setup/doctype/authorization_rule/authorization_rule.txt
index c5949c0b385..9814f5268de 100644
--- a/setup/doctype/authorization_rule/authorization_rule.txt
+++ b/setup/doctype/authorization_rule/authorization_rule.txt
@@ -1,162 +1,160 @@
[
{
- "owner": "Administrator",
+ "creation": "2013-01-10 16:34:22",
"docstatus": 0,
- "creation": "2012-12-14 14:27:06",
+ "modified": "2013-01-23 16:51:17",
"modified_by": "Administrator",
- "modified": "2012-12-17 17:59:54"
+ "owner": "Administrator"
},
{
- "document_type": "Master",
- "name": "__common__",
"autoname": "AR.####",
- "module": "Setup",
"doctype": "DocType",
+ "document_type": "Master",
+ "module": "Setup",
+ "name": "__common__",
"search_fields": "transaction,based_on,system_user,system_role,approving_user,approving_role"
},
{
+ "doctype": "DocField",
"name": "__common__",
"parent": "Authorization Rule",
- "doctype": "DocField",
+ "parentfield": "fields",
"parenttype": "DocType",
- "permlevel": 0,
- "parentfield": "fields"
+ "permlevel": 0
},
{
- "name": "__common__",
- "parent": "Authorization Rule",
- "read": 1,
+ "cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "write": 1,
- "cancel": 1,
+ "name": "__common__",
+ "parent": "Authorization Rule",
+ "parentfield": "permissions",
"parenttype": "DocType",
- "role": "System Manager",
- "report": 1,
"permlevel": 0,
- "parentfield": "permissions"
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "submit": 0,
+ "write": 1
},
{
- "name": "Authorization Rule",
- "doctype": "DocType"
+ "doctype": "DocType",
+ "name": "Authorization Rule"
},
{
- "oldfieldtype": "Link",
"doctype": "DocField",
- "label": "Company",
- "oldfieldname": "company",
"fieldname": "company",
"fieldtype": "Link",
- "search_index": 0,
+ "label": "Company",
+ "oldfieldname": "company",
+ "oldfieldtype": "Link",
+ "options": "Company",
"reqd": 0,
- "options": "Company"
+ "search_index": 0
},
{
- "oldfieldtype": "Select",
"doctype": "DocField",
- "label": "Transaction",
- "oldfieldname": "transaction",
"fieldname": "transaction",
"fieldtype": "Select",
- "reqd": 1,
- "options": "\nDelivery Note\nPurchase Invoice\nPurchase Order\nPurchase Receipt\nQuotation\nSales Invoice\nSales Order\nAppraisal"
+ "label": "Transaction",
+ "oldfieldname": "transaction",
+ "oldfieldtype": "Select",
+ "options": "\nDelivery Note\nPurchase Invoice\nPurchase Order\nPurchase Receipt\nQuotation\nSales Invoice\nSales Order\nAppraisal",
+ "reqd": 1
},
{
- "oldfieldtype": "Select",
"doctype": "DocField",
- "label": "Based On",
- "oldfieldname": "based_on",
"fieldname": "based_on",
"fieldtype": "Select",
- "reqd": 1,
- "options": "\nGrand Total\nAverage Discount\nCustomerwise Discount\nItemwise Discount\nNot Applicable"
+ "label": "Based On",
+ "oldfieldname": "based_on",
+ "oldfieldtype": "Select",
+ "options": "\nGrand Total\nAverage Discount\nCustomerwise Discount\nItemwise Discount\nNot Applicable",
+ "reqd": 1
},
{
- "oldfieldtype": "Link",
"doctype": "DocField",
- "label": "Customer / Item Name",
- "oldfieldname": "master_name",
"fieldname": "master_name",
"fieldtype": "Link",
+ "label": "Customer / Item Name",
+ "oldfieldname": "master_name",
+ "oldfieldtype": "Link",
"options": "[Select]"
},
{
- "oldfieldtype": "Link",
"doctype": "DocField",
- "label": "Applicable To (Role)",
- "oldfieldname": "system_role",
"fieldname": "system_role",
"fieldtype": "Link",
+ "label": "Applicable To (Role)",
+ "oldfieldname": "system_role",
+ "oldfieldtype": "Link",
"options": "Role"
},
{
- "oldfieldtype": "Link",
"doctype": "DocField",
- "label": "Applicable To (User)",
- "oldfieldname": "system_user",
"fieldname": "system_user",
"fieldtype": "Link",
+ "label": "Applicable To (User)",
+ "oldfieldname": "system_user",
+ "oldfieldtype": "Link",
"options": "Profile"
},
{
"description": "This will be used for setting rule in HR module",
- "oldfieldtype": "Link",
"doctype": "DocField",
- "label": "Applicable To (Employee)",
- "oldfieldname": "to_emp",
"fieldname": "to_emp",
"fieldtype": "Link",
- "search_index": 0,
- "options": "Employee"
+ "label": "Applicable To (Employee)",
+ "oldfieldname": "to_emp",
+ "oldfieldtype": "Link",
+ "options": "Employee",
+ "search_index": 0
},
{
"description": "This will be used for setting rule in HR module",
- "oldfieldtype": "Link",
"doctype": "DocField",
- "label": "Applicable To (Designation)",
- "oldfieldname": "to_designation",
"fieldname": "to_designation",
"fieldtype": "Link",
- "search_index": 0,
- "options": "Designation"
+ "label": "Applicable To (Designation)",
+ "oldfieldname": "to_designation",
+ "oldfieldtype": "Link",
+ "options": "Designation",
+ "search_index": 0
},
{
- "oldfieldtype": "Link",
"doctype": "DocField",
- "label": "Approving Role",
- "oldfieldname": "approving_role",
"fieldname": "approving_role",
"fieldtype": "Link",
+ "label": "Approving Role",
+ "oldfieldname": "approving_role",
+ "oldfieldtype": "Link",
"options": "Role"
},
{
- "oldfieldtype": "Link",
"doctype": "DocField",
- "label": "Approving User",
- "oldfieldname": "approving_user",
"fieldname": "approving_user",
"fieldtype": "Link",
+ "label": "Approving User",
+ "oldfieldname": "approving_user",
+ "oldfieldtype": "Link",
"options": "Profile"
},
{
"default": "0.00",
- "oldfieldtype": "Currency",
"doctype": "DocField",
+ "fieldname": "value",
+ "fieldtype": "Float",
"label": "Above Value",
"oldfieldname": "value",
- "fieldname": "value",
- "fieldtype": "Currency"
+ "oldfieldtype": "Currency"
},
{
- "oldfieldtype": "Small Text",
"doctype": "DocField",
+ "fieldname": "trash_reason",
+ "fieldtype": "Small Text",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
- "fieldname": "trash_reason",
- "fieldtype": "Small Text"
- },
- {
- "doctype": "DocPerm"
+ "oldfieldtype": "Small Text"
},
{
"doctype": "DocPerm"
diff --git a/setup/doctype/company/company.txt b/setup/doctype/company/company.txt
index 401f9209b27..9f3ce7504c1 100644
--- a/setup/doctype/company/company.txt
+++ b/setup/doctype/company/company.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:22",
"docstatus": 0,
- "modified": "2013-01-22 16:54:47",
+ "modified": "2013-01-23 16:51:54",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -147,7 +147,8 @@
"fieldtype": "Currency",
"label": "Credit Limit",
"oldfieldname": "credit_limit",
- "oldfieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "default_currency"
},
{
"depends_on": "eval:!doc.__islocal",
diff --git a/setup/doctype/target_detail/target_detail.txt b/setup/doctype/target_detail/target_detail.txt
index b121f990ad3..21b632398d6 100644
--- a/setup/doctype/target_detail/target_detail.txt
+++ b/setup/doctype/target_detail/target_detail.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:24",
"docstatus": 0,
- "modified": "2013-01-22 13:48:39",
+ "modified": "2013-01-23 16:52:10",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -59,7 +59,7 @@
{
"doctype": "DocField",
"fieldname": "target_amount",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"in_filter": 1,
"label": "Target Amount",
"oldfieldname": "target_amount",
diff --git a/stock/doctype/bin/bin.txt b/stock/doctype/bin/bin.txt
index ff8d4311306..cf3fbb17dcb 100644
--- a/stock/doctype/bin/bin.txt
+++ b/stock/doctype/bin/bin.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:25",
"docstatus": 0,
- "modified": "2013-01-22 13:50:19",
+ "modified": "2013-01-23 16:53:15",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -136,7 +136,7 @@
{
"doctype": "DocField",
"fieldname": "ma_rate",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"hidden": 1,
"in_filter": 0,
"label": "Moving Average Rate",
@@ -159,7 +159,7 @@
{
"doctype": "DocField",
"fieldname": "fcfs_rate",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"hidden": 1,
"label": "FCFS Rate",
"oldfieldname": "fcfs_rate",
@@ -170,7 +170,7 @@
{
"doctype": "DocField",
"fieldname": "valuation_rate",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"label": "Valuation Rate",
"oldfieldname": "valuation_rate",
"oldfieldtype": "Currency"
@@ -178,7 +178,7 @@
{
"doctype": "DocField",
"fieldname": "stock_value",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"label": "Stock Value",
"oldfieldname": "stock_value",
"oldfieldtype": "Currency"
diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt
index 6aa34b631e4..4d95396023f 100644
--- a/stock/doctype/delivery_note/delivery_note.txt
+++ b/stock/doctype/delivery_note/delivery_note.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:25",
"docstatus": 0,
- "modified": "2013-01-22 16:54:48",
+ "modified": "2013-01-23 17:11:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -254,6 +254,7 @@
"no_copy": 0,
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
@@ -427,6 +428,7 @@
"label": "Taxes and Charges Total",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
@@ -466,6 +468,7 @@
"no_copy": 0,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
@@ -480,6 +483,7 @@
"no_copy": 0,
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
@@ -514,6 +518,7 @@
"no_copy": 0,
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
@@ -528,6 +533,7 @@
"no_copy": 0,
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
@@ -853,7 +859,7 @@
"description": "% of materials billed against this Delivery Note",
"doctype": "DocField",
"fieldname": "per_billed",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"in_filter": 1,
"label": "% Amount Billed",
"no_copy": 1,
@@ -1088,6 +1094,7 @@
"no_copy": 0,
"oldfieldname": "total_commission",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 0
},
diff --git a/stock/doctype/delivery_note_item/delivery_note_item.txt b/stock/doctype/delivery_note_item/delivery_note_item.txt
index 282747e8323..e2c6fbf7b3d 100644
--- a/stock/doctype/delivery_note_item/delivery_note_item.txt
+++ b/stock/doctype/delivery_note_item/delivery_note_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:26",
"docstatus": 0,
- "modified": "2013-01-22 14:26:18",
+ "modified": "2013-01-23 17:11:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -107,6 +107,7 @@
"no_copy": 0,
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"reqd": 0,
"width": "100px"
@@ -129,6 +130,7 @@
"label": "Rate",
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"reqd": 0,
"width": "150px"
@@ -140,6 +142,7 @@
"label": "Amount",
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@@ -152,6 +155,7 @@
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"width": "100px"
@@ -164,6 +168,7 @@
"label": "Rate*",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"reqd": 0,
"width": "150px"
@@ -175,6 +180,7 @@
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
@@ -255,6 +261,7 @@
"fieldtype": "Currency",
"label": "Billed Amt",
"no_copy": 1,
+ "options": "currency",
"print_hide": 1,
"read_only": 1,
"width": "100px"
diff --git a/stock/doctype/item/item.txt b/stock/doctype/item/item.txt
index e2903babecf..d5ab5a4b086 100644
--- a/stock/doctype/item/item.txt
+++ b/stock/doctype/item/item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-21 18:19:22",
"docstatus": 0,
- "modified": "2013-01-22 14:47:00",
+ "modified": "2013-01-23 17:00:07",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -381,7 +381,7 @@
"description": "Buying Cost will be updated from Purchase Orders and Purchase Receipts. The buying cost will calculated by moving average method.",
"doctype": "DocField",
"fieldname": "buying_cost",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"label": "Buying Cost",
"no_copy": 1,
"oldfieldname": "buying_cost",
@@ -392,7 +392,7 @@
"depends_on": "eval:doc.is_purchase_item==\"Yes\"",
"doctype": "DocField",
"fieldname": "last_purchase_rate",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"label": "Last Purchase Rate",
"no_copy": 1,
"oldfieldname": "last_purchase_rate",
@@ -403,7 +403,7 @@
"depends_on": "eval:doc.is_purchase_item==\"Yes\"",
"doctype": "DocField",
"fieldname": "standard_rate",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"label": "Standard Rate",
"oldfieldname": "standard_rate",
"oldfieldtype": "Currency"
@@ -525,7 +525,7 @@
"depends_on": "eval:doc.is_sales_item==\"Yes\"",
"doctype": "DocField",
"fieldname": "sales_rate",
- "fieldtype": "Currency",
+ "fieldtype": "Float",
"hidden": 1,
"label": "Sales Rate",
"oldfieldname": "sales_rate",
diff --git a/stock/doctype/item_price/item_price.txt b/stock/doctype/item_price/item_price.txt
index 04d3a884073..687a35a07dc 100644
--- a/stock/doctype/item_price/item_price.txt
+++ b/stock/doctype/item_price/item_price.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-21 18:19:14",
"docstatus": 0,
- "modified": "2013-01-22 16:54:49",
+ "modified": "2013-01-23 16:57:49",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -47,6 +47,7 @@
"label": "Ref Rate",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
+ "options": "ref_currency",
"reqd": 0,
"search_index": 0
},
diff --git a/stock/doctype/item_tax/item_tax.txt b/stock/doctype/item_tax/item_tax.txt
index e4e26c308f2..a0bfb575958 100644
--- a/stock/doctype/item_tax/item_tax.txt
+++ b/stock/doctype/item_tax/item_tax.txt
@@ -1,51 +1,46 @@
[
{
- "owner": "Administrator",
+ "creation": "2013-01-10 16:34:27",
"docstatus": 0,
- "creation": "2012-03-27 14:36:33",
+ "modified": "2013-01-23 16:54:25",
"modified_by": "Administrator",
- "modified": "2012-03-27 14:36:33"
+ "owner": "Administrator"
},
{
- "section_style": "Tray",
+ "doctype": "DocType",
"istable": 1,
- "name": "__common__",
- "colour": "White:FFF",
"module": "Stock",
- "show_in_menu": 0,
- "server_code_error": " ",
- "doctype": "DocType"
+ "name": "__common__"
},
{
+ "doctype": "DocField",
"name": "__common__",
"parent": "Item Tax",
- "doctype": "DocField",
+ "parentfield": "fields",
"parenttype": "DocType",
- "permlevel": 0,
- "parentfield": "fields"
+ "permlevel": 0
},
{
- "name": "Item Tax",
- "doctype": "DocType"
+ "doctype": "DocType",
+ "name": "Item Tax"
},
{
- "oldfieldtype": "Link",
"doctype": "DocField",
- "label": "Tax",
- "oldfieldname": "tax_type",
- "trigger": "Client",
"fieldname": "tax_type",
"fieldtype": "Link",
- "reqd": 1,
- "options": "Account"
+ "label": "Tax",
+ "oldfieldname": "tax_type",
+ "oldfieldtype": "Link",
+ "options": "Account",
+ "reqd": 1
},
{
- "oldfieldtype": "Currency",
"doctype": "DocField",
+ "fieldname": "tax_rate",
+ "fieldtype": "Float",
"label": "Tax Rate",
"oldfieldname": "tax_rate",
- "fieldname": "tax_rate",
- "fieldtype": "Currency",
+ "oldfieldtype": "Currency",
"reqd": 0
}
]
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_item/landed_cost_item.txt b/stock/doctype/landed_cost_item/landed_cost_item.txt
index 90fc03fb9b9..b299a27b69e 100644
--- a/stock/doctype/landed_cost_item/landed_cost_item.txt
+++ b/stock/doctype/landed_cost_item/landed_cost_item.txt
@@ -1,60 +1,56 @@
[
{
- "owner": "wasim@webnotestech.com",
+ "creation": "2013-01-10 16:34:27",
"docstatus": 0,
- "creation": "2012-05-03 11:00:55",
+ "modified": "2013-01-23 16:55:26",
"modified_by": "Administrator",
- "modified": "2012-05-04 13:02:26"
+ "owner": "wasim@webnotestech.com"
},
{
- "section_style": "Simple",
+ "doctype": "DocType",
"istable": 1,
- "name": "__common__",
- "colour": "White:FFF",
"module": "Stock",
- "show_in_menu": 0,
- "version": 1,
- "server_code_error": " ",
- "doctype": "DocType"
+ "name": "__common__"
},
{
+ "doctype": "DocField",
"name": "__common__",
"parent": "Landed Cost Item",
- "doctype": "DocField",
+ "parentfield": "fields",
"parenttype": "DocType",
- "reqd": 1,
"permlevel": 0,
- "parentfield": "fields"
+ "reqd": 1
},
{
- "name": "Landed Cost Item",
- "doctype": "DocType"
+ "doctype": "DocType",
+ "name": "Landed Cost Item"
},
{
- "search_index": 1,
"doctype": "DocField",
- "label": "Account Head",
- "oldfieldname": "account_head",
"fieldname": "account_head",
"fieldtype": "Link",
+ "label": "Account Head",
+ "oldfieldname": "account_head",
"oldfieldtype": "Link",
- "options": "Account"
+ "options": "Account",
+ "search_index": 1
},
{
- "oldfieldtype": "Data",
"doctype": "DocField",
+ "fieldname": "description",
+ "fieldtype": "Data",
"label": "Description",
"oldfieldname": "description",
- "width": "300px",
- "fieldname": "description",
- "fieldtype": "Data"
+ "oldfieldtype": "Data",
+ "width": "300px"
},
{
- "oldfieldtype": "Currency",
"doctype": "DocField",
+ "fieldname": "amount",
+ "fieldtype": "Currency",
"label": "Amount",
"oldfieldname": "amount",
- "fieldname": "amount",
- "fieldtype": "Currency"
+ "oldfieldtype": "Currency",
+ "options": "currency"
}
]
\ No newline at end of file
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.txt b/stock/doctype/purchase_receipt/purchase_receipt.txt
index df3f6d0d594..7851133e332 100755
--- a/stock/doctype/purchase_receipt/purchase_receipt.txt
+++ b/stock/doctype/purchase_receipt/purchase_receipt.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-22 15:24:18",
"docstatus": 0,
- "modified": "2013-01-22 16:55:22",
+ "modified": "2013-01-23 17:11:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -390,6 +390,7 @@
"label": "Net Total (Import)",
"oldfieldname": "net_total_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1
},
@@ -400,6 +401,7 @@
"label": "Taxes and Charges Added (Import)",
"oldfieldname": "other_charges_added_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1
},
@@ -410,6 +412,7 @@
"label": "Taxes and Charges Deducted (Import)",
"oldfieldname": "other_charges_deducted_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1
},
@@ -420,6 +423,7 @@
"label": "Grand Total (Import)",
"oldfieldname": "grand_total_import",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1
},
@@ -447,6 +451,7 @@
"label": "Net Total",
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
@@ -460,6 +465,7 @@
"label": "Taxes and Charges Added",
"oldfieldname": "other_charges_added",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -470,6 +476,7 @@
"label": "Taxes and Charges Deducted",
"oldfieldname": "other_charges_deducted",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -480,6 +487,7 @@
"label": "Total Tax",
"oldfieldname": "total_tax",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -490,6 +498,7 @@
"label": "Grand Total",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@@ -500,6 +509,7 @@
"label": "Rounded Total",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
diff --git a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
index d0157008af7..12619b0ca28 100755
--- a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
+++ b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:28",
"docstatus": 0,
- "modified": "2013-01-22 15:02:34",
+ "modified": "2013-01-23 17:11:25",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -118,6 +118,7 @@
"fieldname": "import_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate ",
+ "options": "currency",
"print_hide": 1
},
{
@@ -135,6 +136,7 @@
"label": "Rate",
"oldfieldname": "import_rate",
"oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 0,
"print_width": "100px",
"width": "100px"
@@ -146,6 +148,7 @@
"label": "Amount",
"oldfieldname": "import_amount",
"oldfieldtype": "Currency",
+ "options": "currency",
"read_only": 1
},
{
@@ -153,6 +156,7 @@
"fieldname": "purchase_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate *",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
@@ -163,6 +167,7 @@
"label": "Rate *(Default Curr.)",
"oldfieldname": "purchase_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "100px",
"reqd": 1,
@@ -176,6 +181,7 @@
"label": "Amount (Default Curr.)",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "100px",
"reqd": 0,
@@ -381,6 +387,7 @@
"label": "Raw Materials Supplied Cost",
"oldfieldname": "rm_supp_cost",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
@@ -395,6 +402,7 @@
"no_copy": 1,
"oldfieldname": "item_tax_amount",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
@@ -442,6 +450,7 @@
"no_copy": 1,
"oldfieldname": "valuation_rate",
"oldfieldtype": "Currency",
+ "options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "80px",
"read_only": 1,
diff --git a/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js b/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js
index 138d19bc978..2dd2e71cb1a 100644
--- a/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js
+++ b/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js
@@ -14,6 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
+cur_frm.add_fetch("delivery_note_no", "company", "company");
+cur_frm.add_fetch("sales_invoice_no", "company", "company");
+cur_frm.add_fetch("purchase_receipt_no", "company", "company");
+
// Onload
//-------------------------------
cur_frm.cscript.onload = function(doc,dt,dn){
@@ -217,7 +221,7 @@ cur_frm.cscript.make_jv = function(doc, dr_or_cr, children) {
for(var i=0; i | |