added format_currency and added options to all currency fields
diff --git a/accounts/doctype/account/account.txt b/accounts/doctype/account/account.txt
index 7fc9838..f96e3b2 100644
--- a/accounts/doctype/account/account.txt
+++ b/accounts/doctype/account/account.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-19 10:23:33", 
   "docstatus": 0, 
-  "modified": "2013-01-22 15:05:18", 
+  "modified": "2013-01-23 17:11:26", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -169,7 +169,7 @@
   "description": "Rate at which this tax is applied", 
   "doctype": "DocField", 
   "fieldname": "tax_rate", 
-  "fieldtype": "Currency", 
+  "fieldtype": "Float", 
   "hidden": 0, 
   "label": "Rate", 
   "oldfieldname": "tax_rate", 
@@ -207,6 +207,7 @@
   "label": "Credit Limit", 
   "oldfieldname": "credit_limit", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "permlevel": 0, 
   "print_hide": 1
  }, 
diff --git a/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/accounts/doctype/bank_reconciliation/bank_reconciliation.js
index 4ca9218..51e62cc 100644
--- a/accounts/doctype/bank_reconciliation/bank_reconciliation.js
+++ b/accounts/doctype/bank_reconciliation/bank_reconciliation.js
@@ -14,7 +14,7 @@
 // You should have received a copy of the GNU General Public License
 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+
+cur_frm.add_fetch("bank_account", "company", "company");
 cur_frm.cscript.onload = function(doc, cdt, cdn){
-  // add page head
-  var ph = new PageHeader(cur_frm.fields_dict['head_html'].wrapper, 'Bank Reconciliation', '');
 }
diff --git a/accounts/doctype/bank_reconciliation/bank_reconciliation.txt b/accounts/doctype/bank_reconciliation/bank_reconciliation.txt
index ac5456d..45eae20 100644
--- a/accounts/doctype/bank_reconciliation/bank_reconciliation.txt
+++ b/accounts/doctype/bank_reconciliation/bank_reconciliation.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:05", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:55:57", 
+  "modified": "2013-01-23 17:11:16", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -37,7 +37,7 @@
   "parenttype": "DocType", 
   "permlevel": 0, 
   "read": 1, 
-  "report": 1, 
+  "report": 0, 
   "role": "Accounts User", 
   "submit": 0, 
   "write": 1
@@ -57,6 +57,16 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "company", 
+  "fieldtype": "Link", 
+  "hidden": 1, 
+  "label": "Company", 
+  "options": "Company", 
+  "print_hide": 1, 
+  "reqd": 0
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "from_date", 
   "fieldtype": "Date", 
   "label": "From Date", 
@@ -95,6 +105,7 @@
   "fieldname": "total_amount", 
   "fieldtype": "Currency", 
   "label": "Total Amount", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
diff --git a/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt b/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
index 781a4c8..f4a011d 100644
--- a/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
+++ b/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:05", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:16:42", 
+  "modified": "2013-01-23 17:11:16", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -79,6 +79,7 @@
   "label": "Debit", 
   "oldfieldname": "debit", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
@@ -88,6 +89,7 @@
   "label": "Credit", 
   "oldfieldname": "credit", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
diff --git a/accounts/doctype/budget_detail/budget_detail.txt b/accounts/doctype/budget_detail/budget_detail.txt
index 6d0f31b..58936be 100644
--- a/accounts/doctype/budget_detail/budget_detail.txt
+++ b/accounts/doctype/budget_detail/budget_detail.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:05", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:18:30", 
+  "modified": "2013-01-23 17:02:32", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -44,6 +44,7 @@
   "label": "Budget Allocated", 
   "oldfieldname": "budget_allocated", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency(cur_frm.doc.company_name)", 
   "reqd": 1
  }, 
  {
@@ -53,6 +54,7 @@
   "label": "Actual", 
   "oldfieldname": "actual", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency(cur_frm.doc.company_name)", 
   "read_only": 1
  }, 
  {
diff --git a/accounts/doctype/c_form/c_form.txt b/accounts/doctype/c_form/c_form.txt
index 60e69db..4741706 100644
--- a/accounts/doctype/c_form/c_form.txt
+++ b/accounts/doctype/c_form/c_form.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-19 10:23:34", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:55:58", 
+  "modified": "2013-01-23 17:11:26", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -120,6 +120,7 @@
   "fieldname": "total_amount", 
   "fieldtype": "Currency", 
   "label": "Total Amount", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 0, 
   "reqd": 1
  }, 
@@ -151,6 +152,7 @@
   "fieldname": "total_invoiced_amount", 
   "fieldtype": "Currency", 
   "label": "Total Invoiced Amount", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 0, 
   "read_only": 1
  }, 
diff --git a/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt b/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt
index 6eb7b6d..36d8bbc 100644
--- a/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt
+++ b/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:06", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:18:52", 
+  "modified": "2013-01-23 17:11:16", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -54,6 +54,7 @@
   "fieldname": "net_total", 
   "fieldtype": "Currency", 
   "label": "Net Total", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1, 
   "width": "120px"
  }, 
@@ -62,6 +63,7 @@
   "fieldname": "grand_total", 
   "fieldtype": "Currency", 
   "label": "Grand Total", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1, 
   "width": "120px"
  }
diff --git a/accounts/doctype/gl_entry/gl_entry.txt b/accounts/doctype/gl_entry/gl_entry.txt
index 6116187..433faae 100644
--- a/accounts/doctype/gl_entry/gl_entry.txt
+++ b/accounts/doctype/gl_entry/gl_entry.txt
@@ -1,250 +1,244 @@
 [
  {
-  "owner": "Administrator", 
+  "creation": "2013-01-10 16:34:06", 
   "docstatus": 0, 
-  "creation": "2012-03-27 14:35:42", 
+  "modified": "2013-01-23 17:11:17", 
   "modified_by": "Administrator", 
-  "modified": "2012-03-27 14:35:42"
+  "owner": "Administrator"
  }, 
  {
-  "section_style": "Simple", 
-  "in_create": 1, 
-  "search_fields": "voucher_no,account,posting_date,against_voucher", 
-  "module": "Accounts", 
-  "server_code_error": " ", 
   "autoname": "GL.#######", 
-  "_last_update": "1319016431", 
-  "name": "__common__", 
-  "colour": "White:FFF", 
   "doctype": "DocType", 
-  "show_in_menu": 0, 
-  "version": 103
+  "in_create": 1, 
+  "module": "Accounts", 
+  "name": "__common__", 
+  "search_fields": "voucher_no,account,posting_date,against_voucher"
  }, 
  {
-  "name": "__common__", 
-  "parent": "GL Entry", 
   "doctype": "DocField", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "parentfield": "fields"
- }, 
- {
   "name": "__common__", 
   "parent": "GL Entry", 
-  "read": 1, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "write": 0, 
-  "report": 1, 
+  "parentfield": "fields", 
   "parenttype": "DocType", 
-  "parentfield": "permissions"
- }, 
- {
-  "name": "GL Entry", 
-  "doctype": "DocType"
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "role": "Accounts User", 
-  "doctype": "DocPerm", 
-  "submit": 0
- }, 
- {
-  "amend": 0, 
-  "doctype": "DocPerm", 
-  "submit": 0, 
-  "role": "Accounts Manager", 
-  "cancel": 0, 
   "permlevel": 0
  }, 
  {
-  "role": "System Manager", 
+  "create": 0, 
+  "doctype": "DocPerm", 
+  "name": "__common__", 
+  "parent": "GL Entry", 
+  "parentfield": "permissions", 
+  "parenttype": "DocType", 
   "permlevel": 0, 
-  "doctype": "DocPerm"
+  "read": 1, 
+  "report": 1, 
+  "submit": 0, 
+  "write": 0
+ }, 
+ {
+  "doctype": "DocType", 
+  "name": "GL Entry"
  }, 
  {
   "description": "The date at which current entry will get or has actually executed.", 
-  "search_index": 1, 
   "doctype": "DocField", 
-  "label": "Posting Date", 
-  "oldfieldname": "posting_date", 
   "fieldname": "posting_date", 
   "fieldtype": "Date", 
+  "in_filter": 1, 
+  "label": "Posting Date", 
+  "oldfieldname": "posting_date", 
   "oldfieldtype": "Date", 
-  "in_filter": 1
+  "search_index": 1
  }, 
  {
   "description": "The date at which current entry is made in system.", 
-  "oldfieldtype": "Date", 
   "doctype": "DocField", 
+  "fieldname": "transaction_date", 
+  "fieldtype": "Date", 
   "label": "Transaction Date", 
   "oldfieldname": "transaction_date", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date"
+  "oldfieldtype": "Date"
  }, 
  {
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Aging Date", 
-  "oldfieldname": "aging_date", 
   "fieldname": "aging_date", 
   "fieldtype": "Date", 
+  "in_filter": 1, 
+  "label": "Aging Date", 
+  "oldfieldname": "aging_date", 
   "oldfieldtype": "Date", 
-  "in_filter": 1
+  "search_index": 0
  }, 
  {
-  "search_index": 1, 
   "doctype": "DocField", 
-  "label": "Account", 
-  "oldfieldname": "account", 
   "fieldname": "account", 
   "fieldtype": "Link", 
+  "in_filter": 1, 
+  "label": "Account", 
+  "oldfieldname": "account", 
   "oldfieldtype": "Link", 
   "options": "Account", 
-  "in_filter": 1
+  "search_index": 1
  }, 
  {
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Cost Center", 
-  "oldfieldname": "cost_center", 
   "fieldname": "cost_center", 
   "fieldtype": "Link", 
+  "in_filter": 1, 
+  "label": "Cost Center", 
+  "oldfieldname": "cost_center", 
   "oldfieldtype": "Link", 
   "options": "Cost Center", 
-  "in_filter": 1
+  "search_index": 0
  }, 
  {
-  "oldfieldtype": "Currency", 
   "doctype": "DocField", 
+  "fieldname": "debit", 
+  "fieldtype": "Currency", 
   "label": "Debit Amt", 
   "oldfieldname": "debit", 
-  "fieldname": "debit", 
-  "fieldtype": "Currency"
+  "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()"
  }, 
  {
-  "oldfieldtype": "Currency", 
   "doctype": "DocField", 
+  "fieldname": "credit", 
+  "fieldtype": "Currency", 
   "label": "Credit Amt", 
   "oldfieldname": "credit", 
-  "fieldname": "credit", 
-  "fieldtype": "Currency"
+  "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()"
  }, 
  {
-  "oldfieldtype": "Text", 
   "doctype": "DocField", 
-  "label": "Against", 
-  "oldfieldname": "against", 
   "fieldname": "against", 
   "fieldtype": "Text", 
-  "in_filter": 1
+  "in_filter": 1, 
+  "label": "Against", 
+  "oldfieldname": "against", 
+  "oldfieldtype": "Text"
  }, 
  {
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Against Voucher", 
-  "oldfieldname": "against_voucher", 
   "fieldname": "against_voucher", 
   "fieldtype": "Data", 
+  "in_filter": 1, 
+  "label": "Against Voucher", 
+  "oldfieldname": "against_voucher", 
   "oldfieldtype": "Data", 
-  "in_filter": 1
+  "search_index": 0
  }, 
  {
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Against Voucher Type", 
-  "oldfieldname": "against_voucher_type", 
   "fieldname": "against_voucher_type", 
   "fieldtype": "Data", 
+  "in_filter": 0, 
+  "label": "Against Voucher Type", 
+  "oldfieldname": "against_voucher_type", 
   "oldfieldtype": "Data", 
-  "in_filter": 0
+  "search_index": 0
  }, 
  {
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Voucher Type", 
-  "oldfieldname": "voucher_type", 
   "fieldname": "voucher_type", 
   "fieldtype": "Select", 
+  "in_filter": 1, 
+  "label": "Voucher Type", 
+  "oldfieldname": "voucher_type", 
   "oldfieldtype": "Select", 
   "options": "Journal Voucher\nSales Invoice\nPurchase Invoice", 
-  "in_filter": 1
+  "search_index": 0
  }, 
  {
-  "search_index": 1, 
   "doctype": "DocField", 
-  "label": "Voucher No", 
-  "oldfieldname": "voucher_no", 
   "fieldname": "voucher_no", 
   "fieldtype": "Data", 
+  "in_filter": 1, 
+  "label": "Voucher No", 
+  "oldfieldname": "voucher_no", 
   "oldfieldtype": "Data", 
-  "in_filter": 1
+  "search_index": 1
  }, 
  {
-  "no_copy": 1, 
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Remarks", 
-  "oldfieldname": "remarks", 
   "fieldname": "remarks", 
   "fieldtype": "Text", 
+  "in_filter": 1, 
+  "label": "Remarks", 
+  "no_copy": 1, 
+  "oldfieldname": "remarks", 
   "oldfieldtype": "Text", 
-  "in_filter": 1
+  "search_index": 0
  }, 
  {
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Is Cancelled", 
-  "oldfieldname": "is_cancelled", 
   "fieldname": "is_cancelled", 
   "fieldtype": "Select", 
+  "in_filter": 1, 
+  "label": "Is Cancelled", 
+  "oldfieldname": "is_cancelled", 
   "oldfieldtype": "Select", 
   "options": "No\nYes", 
-  "in_filter": 1
+  "search_index": 0
  }, 
  {
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Is Opening", 
-  "oldfieldname": "is_opening", 
   "fieldname": "is_opening", 
   "fieldtype": "Select", 
+  "in_filter": 1, 
+  "label": "Is Opening", 
+  "oldfieldname": "is_opening", 
   "oldfieldtype": "Select", 
   "options": "No\nYes", 
-  "in_filter": 1
+  "search_index": 0
  }, 
  {
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Is Advance", 
-  "oldfieldname": "is_advance", 
   "fieldname": "is_advance", 
   "fieldtype": "Select", 
+  "in_filter": 0, 
+  "label": "Is Advance", 
+  "oldfieldname": "is_advance", 
   "oldfieldtype": "Select", 
   "options": "No\nYes", 
-  "in_filter": 0
+  "search_index": 0
  }, 
  {
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
   "fieldname": "fiscal_year", 
   "fieldtype": "Select", 
+  "in_filter": 1, 
+  "label": "Fiscal Year", 
+  "oldfieldname": "fiscal_year", 
   "oldfieldtype": "Select", 
   "options": "link:Fiscal Year", 
-  "in_filter": 1
+  "search_index": 0
  }, 
  {
-  "search_index": 0, 
   "doctype": "DocField", 
-  "label": "Company", 
-  "oldfieldname": "company", 
   "fieldname": "company", 
   "fieldtype": "Link", 
+  "in_filter": 1, 
+  "label": "Company", 
+  "oldfieldname": "company", 
   "oldfieldtype": "Link", 
   "options": "Company", 
-  "in_filter": 1
+  "search_index": 0
+ }, 
+ {
+  "amend": 0, 
+  "cancel": 0, 
+  "doctype": "DocPerm", 
+  "role": "Accounts User"
+ }, 
+ {
+  "amend": 0, 
+  "cancel": 0, 
+  "doctype": "DocPerm", 
+  "role": "Accounts Manager"
+ }, 
+ {
+  "doctype": "DocPerm", 
+  "role": "System Manager"
  }
 ]
\ No newline at end of file
diff --git a/accounts/doctype/journal_voucher/journal_voucher.js b/accounts/doctype/journal_voucher/journal_voucher.js
index 7e1ffda..444763a 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.js
+++ b/accounts/doctype/journal_voucher/journal_voucher.js
@@ -151,7 +151,7 @@
 		method: "accounts.utils.get_balance_on",
 		args: {account: d.account, date: doc.posting_date},
 		callback: function(r) {
-			d.balance = fmt_money(r.message);
+			d.balance = format_currency(r.message, erpnext.get_currency(doc.company));
 			refresh_field('balance', d.name, 'entries');
 		}
 	});
@@ -161,7 +161,6 @@
 	cur_frm.cscript.update_totals(doc);
 }
 
-// ***************** Get Print Heading based on Sales Invoice *****************
 cur_frm.fields_dict['select_print_heading'].get_query = function(doc, cdt, cdn) {
 	return 'SELECT `tabPrint Heading`.name FROM `tabPrint Heading` WHERE `tabPrint Heading`.docstatus !=2 AND `tabPrint Heading`.name LIKE "%s" ORDER BY `tabPrint Heading`.name ASC LIMIT 50';
 }
diff --git a/accounts/doctype/journal_voucher/journal_voucher.txt b/accounts/doctype/journal_voucher/journal_voucher.txt
index d1ee1db..7482038 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.txt
+++ b/accounts/doctype/journal_voucher/journal_voucher.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-19 10:23:34", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:56:03", 
+  "modified": "2013-01-23 17:11:27", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -123,6 +123,7 @@
   "no_copy": 1, 
   "oldfieldname": "total_debit", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
@@ -134,6 +135,7 @@
   "no_copy": 1, 
   "oldfieldname": "total_credit", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
@@ -149,6 +151,7 @@
   "no_copy": 1, 
   "oldfieldname": "difference", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -308,6 +311,7 @@
   "fieldname": "write_off_amount", 
   "fieldtype": "Currency", 
   "label": "Write Off Amount <=", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "report_hide": 1
  }, 
diff --git a/accounts/doctype/journal_voucher/journal_voucher_list.js b/accounts/doctype/journal_voucher/journal_voucher_list.js
index e31cee8..0d7bd08 100644
--- a/accounts/doctype/journal_voucher/journal_voucher_list.js
+++ b/accounts/doctype/journal_voucher/journal_voucher_list.js
@@ -28,7 +28,7 @@
 		{
 			width: '18%', 
 			content: function(parent, data) { 
-				$(parent).html(wn.boot.company[data.company].default_currency + ' ' + fmt_money(data.total_debit)) 
+				$(parent).html(format_currency(data.total_debit, erpnext.get_currency(data.company))); 
 			},
 			css: {'text-align':'right'}
 		},
diff --git a/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt b/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt
index 50d862c..397eb0c 100644
--- a/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt
+++ b/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:06", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:47:01", 
+  "modified": "2013-01-23 17:11:17", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -44,7 +44,8 @@
   "fieldtype": "Currency", 
   "label": "Debit", 
   "oldfieldname": "debit", 
-  "oldfieldtype": "Currency"
+  "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()"
  }, 
  {
   "doctype": "DocField", 
@@ -52,7 +53,8 @@
   "fieldtype": "Currency", 
   "label": "Credit", 
   "oldfieldname": "credit", 
-  "oldfieldtype": "Currency"
+  "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()"
  }, 
  {
   "doctype": "DocField", 
diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js
index f719db9..708c015 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js
+++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js
@@ -17,6 +17,8 @@
 // Booking Entry Id
 // --------------------
 
+cur_frm.add_fetch("account", "company", "company")
+
 cur_frm.cscript.onload_post_render = function(doc) {
 	$(cur_frm.get_field("reconcile").input).addClass("btn-info");
 }
diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
index 5a83314..ec3fa5b 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
+++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-21 18:19:17", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:56:41", 
+  "modified": "2013-01-23 17:11:27", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -31,7 +31,8 @@
   "parenttype": "DocType", 
   "permlevel": 0, 
   "read": 1, 
-  "report": 1, 
+  "report": 0, 
+  "role": "Accounts User", 
   "submit": 0, 
   "write": 1
  }, 
@@ -49,6 +50,15 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "company", 
+  "fieldtype": "Link", 
+  "hidden": 1, 
+  "label": "Company", 
+  "options": "Company", 
+  "print_hide": 1
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "voucher_type", 
   "fieldtype": "Select", 
   "label": "Voucher Type", 
@@ -82,6 +92,7 @@
   "fieldname": "total_amount", 
   "fieldtype": "Currency", 
   "label": "Total Amount", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
@@ -89,6 +100,7 @@
   "fieldname": "pending_amt_to_reconcile", 
   "fieldtype": "Currency", 
   "label": "Outstanding Amount", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
@@ -166,15 +178,6 @@
   "label": "Amount <="
  }, 
  {
-  "doctype": "DocPerm", 
-  "role": "System Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
+  "doctype": "DocPerm"
  }
 ]
\ No newline at end of file
diff --git a/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt b/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt
index 562febe..dd1a97f 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt
+++ b/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:07", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:47:04", 
+  "modified": "2013-01-23 17:11:17", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -40,6 +40,7 @@
   "fieldname": "amt_due", 
   "fieldtype": "Currency", 
   "label": "Unmatched Amount", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
@@ -47,6 +48,7 @@
   "fieldname": "amt_to_be_reconciled", 
   "fieldtype": "Currency", 
   "label": "Allocated Amount", 
+  "options": "eval:erpnext.get_currency()", 
   "reqd": 1
  }, 
  {
@@ -61,6 +63,7 @@
   "fieldname": "total_amt", 
   "fieldtype": "Currency", 
   "label": "Total Amount", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.txt b/accounts/doctype/purchase_invoice/purchase_invoice.txt
index 49e6e1c..b1bd5f2 100755
--- a/accounts/doctype/purchase_invoice/purchase_invoice.txt
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-21 18:19:17", 
   "docstatus": 0, 
-  "modified": "2013-01-22 16:55:20", 
+  "modified": "2013-01-23 17:25:09", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -75,6 +75,17 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "supplier", 
+  "fieldtype": "Link", 
+  "hidden": 0, 
+  "label": "Supplier", 
+  "oldfieldname": "supplier", 
+  "oldfieldtype": "Link", 
+  "options": "Supplier", 
+  "print_hide": 1
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "supplier_name", 
   "fieldtype": "Text", 
   "hidden": 1, 
@@ -346,6 +357,7 @@
   "label": "Total Tax", 
   "oldfieldname": "total_tax", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -356,17 +368,6 @@
   "label": "Contact Info"
  }, 
  {
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Supplier", 
-  "oldfieldname": "supplier", 
-  "oldfieldtype": "Link", 
-  "options": "Supplier", 
-  "print_hide": 1
- }, 
- {
   "depends_on": "eval:doc.supplier", 
   "doctype": "DocField", 
   "fieldname": "supplier_address", 
@@ -403,6 +404,7 @@
   "label": "Net Total (Import)", 
   "oldfieldname": "net_total_import", 
   "oldfieldtype": "Currency", 
+  "options": "currency", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -413,6 +415,7 @@
   "label": "Taxes and Charges Added (Import)", 
   "oldfieldname": "other_charges_added_import", 
   "oldfieldtype": "Currency", 
+  "options": "currency", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -423,6 +426,7 @@
   "label": "Taxes and Charges Deducted (Import)", 
   "oldfieldname": "other_charges_deducted_import", 
   "oldfieldtype": "Currency", 
+  "options": "currency", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -433,6 +437,7 @@
   "label": "Grand Total (Import)", 
   "oldfieldname": "grand_total_import", 
   "oldfieldtype": "Currency", 
+  "options": "currency", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -455,6 +460,7 @@
   "no_copy": 1, 
   "oldfieldname": "total_amount_to_pay", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -466,6 +472,7 @@
   "no_copy": 1, 
   "oldfieldname": "total_advance", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -478,6 +485,7 @@
   "no_copy": 1, 
   "oldfieldname": "outstanding_amount", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "read_only": 1, 
   "search_index": 1
@@ -498,6 +506,7 @@
   "label": "Net Total", 
   "oldfieldname": "net_total", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -508,6 +517,7 @@
   "label": "Taxes and Charges Added", 
   "oldfieldname": "other_charges_added", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -518,6 +528,7 @@
   "label": "Taxes and Charges Deducted", 
   "oldfieldname": "other_charges_deducted", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -528,6 +539,7 @@
   "label": "Grand Total", 
   "oldfieldname": "grand_total", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "read_only": 1
  }, 
@@ -548,6 +560,7 @@
   "fieldtype": "Currency", 
   "label": "Write Off Amount", 
   "no_copy": 1, 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1
  }, 
  {
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice_list.js b/accounts/doctype/purchase_invoice/purchase_invoice_list.js
index 7bb2558..149f46f 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice_list.js
+++ b/accounts/doctype/purchase_invoice/purchase_invoice_list.js
@@ -35,7 +35,7 @@
 		{
 			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/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt b/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt
index 6da6a28..08ff6fc 100644
--- a/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt
+++ b/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:08", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:47:52", 
+  "modified": "2013-01-23 17:11:17", 
   "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": "100px"
  }, 
@@ -65,6 +66,7 @@
   "label": "Allocated Amount", 
   "oldfieldname": "allocated_amount", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "width": "100px"
  }, 
  {
diff --git a/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt b/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
index e17fbf0..a810a45 100755
--- a/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
+++ b/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:08", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:47:52", 
+  "modified": "2013-01-23 17:11:17", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -82,6 +82,7 @@
   "fieldname": "import_ref_rate", 
   "fieldtype": "Currency", 
   "label": "Ref Rate ", 
+  "options": "currency", 
   "print_hide": 1
  }, 
  {
@@ -98,6 +99,7 @@
   "label": "Rate ", 
   "oldfieldname": "import_rate", 
   "oldfieldtype": "Currency", 
+  "options": "currency", 
   "print_hide": 0, 
   "reqd": 1
  }, 
@@ -108,6 +110,7 @@
   "label": "Amount", 
   "oldfieldname": "import_amount", 
   "oldfieldtype": "Currency", 
+  "options": "currency", 
   "read_only": 1, 
   "reqd": 1
  }, 
@@ -116,6 +119,7 @@
   "fieldname": "purchase_ref_rate", 
   "fieldtype": "Currency", 
   "label": "Ref Rate *", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1
  }, 
  {
@@ -125,6 +129,7 @@
   "label": "Rate *(Default Curr.)", 
   "oldfieldname": "rate", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "reqd": 1
  }, 
@@ -135,6 +140,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/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt b/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
index 50711eb..976a215 100644
--- a/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
+++ b/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:08", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:47:56", 
+  "modified": "2013-01-23 17:11:17", 
   "modified_by": "Administrator", 
   "owner": "wasim@webnotestech.com"
  }, 
@@ -72,6 +72,7 @@
   "label": "Rate", 
   "oldfieldname": "rate", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "reqd": 0
  }, 
  {
@@ -81,6 +82,7 @@
   "label": "Amount", 
   "oldfieldname": "tax_amount", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "reqd": 0
  }, 
  {
@@ -90,6 +92,7 @@
   "label": "Total", 
   "oldfieldname": "total", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
@@ -156,6 +159,7 @@
   "no_copy": 1, 
   "oldfieldname": "total_tax_amount", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_hide": 1, 
   "report_hide": 1
  }, 
@@ -169,6 +173,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/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
index fa2c836..6158e26 100644
--- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
+++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
@@ -31,8 +31,8 @@
   var make_row = function(title,val,bold){
     var bstart = '<b>'; var bend = '</b>';
     return '<tr><td style="width:50%;">'+(bold?bstart:'')+title+(bold?bend:'')+'</td>'
-     +'<td style="width:25%;text-align:right;">'+doc.currency+'</td>'
-     +'<td style="width:25%;text-align:right;">'+val+'</td>'
+     +'<td style="width:25%;text-align:right;"></td>'
+     +'<td style="width:25%;text-align:right;">'+format_currency(val, doc.currency)+'</td>'
      +'</tr>'
   }
 
@@ -44,20 +44,22 @@
   var cl = getchildren('Purchase Taxes and Charges',doc.name,'purchase_tax_details');
 
   // outer table  
-  var out='<div><table class="noborder" style="width:100%"><tr><td style="width: 60%"></td><td>';
+  var out='<div><table class="noborder" style="width:100%">\
+		<tr><td style="width: 60%"></td><td>';
   
   // main table
-  out +='<table class="noborder" style="width:100%">'+make_row('Net Total',fmt_money(convert_rate(doc.net_total)),1);
+  out +='<table class="noborder" style="width:100%">'
+		+make_row('Net Total',convert_rate(doc.net_total),1);
 
   // add rows
   if(cl.length){
     for(var i=0;i<cl.length;i++){
-      out += make_row(cl[i].description,fmt_money(convert_rate(cl[i].tax_amount)),0);
+      out += make_row(cl[i].description,convert_rate(cl[i].tax_amount),0);
     }
   }
   
   // grand total
-  out +=make_row('Grand Total',fmt_money(doc.grand_total_import),1)
+  out +=make_row('Grand Total',doc.grand_total_import,1)
   if(doc.in_words_import){
     out +='</table></td></tr>';
     out += '<tr><td colspan = "2">';
diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt
index 18e5e0a..2b35a2d 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 cbe1741..463350b 100644
--- a/accounts/doctype/sales_invoice/sales_invoice_list.js
+++ b/accounts/doctype/sales_invoice/sales_invoice_list.js
@@ -32,7 +32,7 @@
 		{
 			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 dc035b5..f7c3c5a 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 9bf9598..43685b2 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 293a5a8..f076063 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 16bf1bb..7d441ab 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 @@
 	var make_row = function(title,val,bold){
 		var bstart = '<b>'; var bend = '</b>';
 		return '<tr><td style="width:50%;">'+(bold?bstart:'')+title+(bold?bend:'')+'</td>'
-		 +'<td style="width:25%;text-align:right;">'+doc.currency+'</td>'
-		 +'<td style="width:25%;text-align:right;">'+val+'</td>'
+		 +'<td style="width:25%;text-align:right;"></td>'
+		 +'<td style="width:25%;text-align:right;">'+format_currency(val, doc.currency)+'</td>'
 		 +'</tr>'
 	}
 
@@ -73,24 +73,24 @@
 
 		out +='<table class="noborder" style="width:100%">';
 		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<cl.length;i++){
-				if(fmt_money(convert_rate(cl[i].tax_amount))!=0 && !cl[i].included_in_print_rate)
-				  out += make_row(cl[i].description,fmt_money(convert_rate(cl[i].tax_amount)),0);
+				if(convert_rate(cl[i].tax_amount)!=0 && !cl[i].included_in_print_rate)
+				  out += make_row(cl[i].description,convert_rate(cl[i].tax_amount),0);
 			}
 		}
 
 		// grand total
 		if(!print_hide_dict['grand_total_export']) {
-			out += make_row('Grand Total',fmt_money(doc.grand_total_export),1);
+			out += make_row('Grand Total',doc.grand_total_export,1);
 		}
 		
 		if(!print_hide_dict['rounded_total_export']) {
-			out += make_row('Rounded Total',fmt_money(doc.rounded_total_export),1);
+			out += make_row('Rounded Total',doc.rounded_total_export,1);
 		}
 
 		if(doc.in_words_export && !print_hide_dict['in_words_export']){
@@ -184,4 +184,4 @@
   }
   validated = false;
   refresh_field('tax_amount',d.name,'other_charges');
-}
+};
\ No newline at end of file
diff --git a/accounts/page/accounts_browser/accounts_browser.js b/accounts/page/accounts_browser/accounts_browser.js
index 6a6d97e..da045a6 100644
--- a/accounts/page/accounts_browser/accounts_browser.js
+++ b/accounts/page/accounts_browser/accounts_browser.js
@@ -112,9 +112,8 @@
 				if (ctype == 'Account') {
 					var bal = treenode.data && treenode.data.balance.split(' ') || ['',''];
 					if (bal && flt(bal[1])) {
-						treenode.parent.append('<span class="balance-area">\
-							<span style="color: #aaa">'+ bal[0] + '</span> ' 
-							+ fmt_money(bal[1]) + '</span>');
+						treenode.parent.append('<span class="balance-area">' 
+							+ format_currency(bal[1], bal[0]) + '</span>');
 					}
 				}
 			}
diff --git a/accounts/page/accounts_browser/accounts_browser.py b/accounts/page/accounts_browser/accounts_browser.py
index 4bcf7a4..1a66fe3 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 372f5ae..2fd8afb 100644
--- a/accounts/page/financial_statements/financial_statements.js
+++ b/accounts/page/financial_statements/financial_statements.js
@@ -83,9 +83,11 @@
   $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 @@
           }
           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 fcb0b6a..bb513fc 100644
--- a/buying/doctype/purchase_common/purchase_common.js
+++ b/buying/doctype/purchase_common/purchase_common.js
@@ -242,8 +242,7 @@
 	},
 	
 	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 @@
 				//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 @@
 				//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 0dd2a53..eed812f 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 762c635..387d24d 100644
--- a/buying/doctype/purchase_order/purchase_order_list.js
+++ b/buying/doctype/purchase_order/purchase_order_list.js
@@ -23,7 +23,7 @@
 		{
 			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 6e93ee6..de70973 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 742dbb8..d78763e 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 7c36bba..f7a0f8c 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 e6fa16e..6d98053 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 6b2970b..709e2cd 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 60b1f52..e7e6a5b 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation_list.js
+++ b/buying/doctype/supplier_quotation/supplier_quotation_list.js
@@ -20,7 +20,7 @@
 		{
 			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 4424da3..4432379 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 65a9393..18cac68 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 8587320..8c822ef 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 a1331fa..ea52df8 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 19d5427..c3c81b1 100644
--- a/hr/doctype/expense_claim/expense_claim_list.js
+++ b/hr/doctype/expense_claim/expense_claim_list.js
@@ -17,8 +17,7 @@
 		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 @@
 		{
 			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 f28811f..2d6a23c 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 5ab7204..0f68971 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 0763e27..dc0b836 100644
--- a/hr/doctype/salary_slip/salary_slip_list.js
+++ b/hr/doctype/salary_slip/salary_slip_list.js
@@ -33,13 +33,8 @@
 		{
 			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 8586bf2..545fe94 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 5280cd8..aafab56 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 2800aeb..e30d9a2 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 77259b5..53182ed 100644
--- a/hr/doctype/salary_structure/salary_structure_list.js
+++ b/hr/doctype/salary_structure/salary_structure_list.js
@@ -33,13 +33,8 @@
 		{
 			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 1f4d246..262cf95 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 93961d5..25d4294 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 dbf835cc..c960494 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 8e355f3..59e34d0 100644
--- a/manufacturing/doctype/bom/bom_list.js
+++ b/manufacturing/doctype/bom/bom_list.js
@@ -36,8 +36,7 @@
 		{
 			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 08ab2de..fb09611 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 fd3c44d..1da7f0d 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 c31c57a..e722bbe 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 193a041..de011dc 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 cba3227..8dcb805 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 2c277b2..4d089bd 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"
  }, 
@@ -198,6 +198,13 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "company", 
+  "fieldtype": "Link", 
+  "label": "Company", 
+  "options": "Company"
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "project_details", 
   "fieldtype": "Section Break", 
   "label": "Project Costing", 
@@ -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 9adbe72..e0fc378 100644
--- a/projects/doctype/project/project_list.js
+++ b/projects/doctype/project/project_list.js
@@ -34,15 +34,14 @@
 		{
 			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 20629c5..472ca6b 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 8573b97..96d6e41 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", 
@@ -233,6 +235,18 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "column_break_22", 
+  "fieldtype": "Column Break"
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "company", 
+  "fieldtype": "Link", 
+  "label": "Company", 
+  "options": "Company"
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "file_list", 
   "fieldtype": "Text", 
   "hidden": 1, 
diff --git a/public/js/utils.js b/public/js/utils.js
index 436c532..06d3a53 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 e859342..a907bda 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 923546d..8d80e8b 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 72bc7a7..ca788d4 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 8530629..55cbc1d 100644
--- a/selling/doctype/quotation/quotation_list.js
+++ b/selling/doctype/quotation/quotation_list.js
@@ -31,7 +31,7 @@
 		{
 			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 13b9966..49f9b65 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 7cc6442..eb7bc29 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 4ceac9e..50b97a2 100644
--- a/selling/doctype/sales_common/sales_common.js
+++ b/selling/doctype/sales_common/sales_common.js
@@ -172,23 +172,28 @@
 				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 @@
 			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 607b132..55854b5 100644
--- a/selling/doctype/sales_order/sales_order.js
+++ b/selling/doctype/sales_order/sales_order.js
@@ -27,8 +27,6 @@
 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 @@
 }
 
 
-//================ 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 @@
 	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 @@
 }
 
 
-// *************** 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 @@
 	}
 }
 
-//------------ make maintenance visit ------------
 cur_frm.cscript.make_maintenance_visit = function() {
 	var doc = cur_frm.doc;
 
@@ -251,8 +244,6 @@
 	}
 }
 
-// make indent
-// ================================================================================================
 cur_frm.cscript['Make Purchase Request'] = function() {
 	var doc = cur_frm.doc;
 	if (doc.docstatus == 1) { 
@@ -272,8 +263,6 @@
 }
 
 
-// MAKE DELIVERY NOTE
-// ================================================================================================
 cur_frm.cscript['Make Delivery Note'] = function() {
 	var doc = cur_frm.doc;
 	if (doc.docstatus == 1) { 
@@ -293,8 +282,6 @@
 }
 
 
-// MAKE SALES INVOICE
-// ================================================================================================
 cur_frm.cscript['Make Sales Invoice'] = function() {
 	var doc = cur_frm.doc;
 
@@ -312,36 +299,36 @@
 }
 
 
-// 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 @@
 	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 159708c..1c543d4 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 a386f35..16050c9 100644
--- a/selling/doctype/sales_order/sales_order_list.js
+++ b/selling/doctype/sales_order/sales_order_list.js
@@ -24,7 +24,7 @@
 		{
 			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 bf2b37d..b32e23f 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 01f5260..d57929f 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 c5949c0..9814f52 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 401f920..9f3ce75 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 b121f99..21b6323 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 ff8d431..cf3fbb1 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 6aa34b6..4d95396 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 282747e..e2c6fbf 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 e2903ba..d5ab5a4 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. <br>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 04d3a88..687a35a 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 e4e26c3..a0bfb57 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 90fc03f..b299a27 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 df3f6d0..7851133 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 d015700..12619b0 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 138d19b..2dd2e71 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 <http://www.gnu.org/licenses/>.
 
+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 @@
 		for(var i=0; i<children.length; i++) {
 			var ch = wn.model.add_child(jv, 'Journal Voucher Detail', 'entries');
 			$.extend(ch, children[i]);
-			ch.balance = fmt_money(ch.balance);
+			ch.balance = flt(ch.balance);
 		}
 	}
 
diff --git a/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.txt b/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.txt
index 27a9191..2daf6ac 100644
--- a/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.txt
+++ b/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:29", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:57:23", 
+  "modified": "2013-01-23 16:48:38", 
   "modified_by": "Administrator", 
   "owner": "wasim@webnotestech.com"
  }, 
@@ -30,7 +30,7 @@
   "parenttype": "DocType", 
   "permlevel": 0, 
   "read": 1, 
-  "report": 1, 
+  "report": 0, 
   "submit": 0, 
   "write": 1
  }, 
@@ -92,6 +92,15 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "company", 
+  "fieldtype": "Link", 
+  "hidden": 1, 
+  "label": "Company", 
+  "options": "Company", 
+  "print_hide": 1
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "cust_supp", 
   "fieldtype": "Data", 
   "hidden": 1, 
@@ -176,22 +185,6 @@
   "role": "Material User"
  }, 
  {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material Manager"
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "role": "System Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager"
- }, 
- {
   "doctype": "DocPerm", 
   "role": "Accounts User"
  }
diff --git a/stock/doctype/sales_bom_item/sales_bom_item.txt b/stock/doctype/sales_bom_item/sales_bom_item.txt
index 6384b46..0a77211 100644
--- a/stock/doctype/sales_bom_item/sales_bom_item.txt
+++ b/stock/doctype/sales_bom_item/sales_bom_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:29", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:47:59", 
+  "modified": "2013-01-23 16:56:21", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -55,7 +55,7 @@
  {
   "doctype": "DocField", 
   "fieldname": "rate", 
-  "fieldtype": "Currency", 
+  "fieldtype": "Float", 
   "label": "Rate", 
   "oldfieldname": "rate", 
   "oldfieldtype": "Currency"
diff --git a/stock/doctype/serial_no/serial_no.txt b/stock/doctype/serial_no/serial_no.txt
index 144fcc8..6758436 100644
--- a/stock/doctype/serial_no/serial_no.txt
+++ b/stock/doctype/serial_no/serial_no.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-10 16:34:29", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:50:06", 
+  "modified": "2013-01-23 17:11:26", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -196,6 +196,7 @@
   "no_copy": 1, 
   "oldfieldname": "purchase_rate", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "reqd": 1, 
   "search_index": 0
  }, 
diff --git a/stock/doctype/stock_entry_detail/stock_entry_detail.txt b/stock/doctype/stock_entry_detail/stock_entry_detail.txt
index 8d2779a..e042b65 100644
--- a/stock/doctype/stock_entry_detail/stock_entry_detail.txt
+++ b/stock/doctype/stock_entry_detail/stock_entry_detail.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-14 16:33:34", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:50:07", 
+  "modified": "2013-01-23 17:11:26", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -101,6 +101,7 @@
   "label": "Valuation Rate", 
   "oldfieldname": "incoming_rate", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 0, 
   "reqd": 0
  }, 
@@ -111,6 +112,7 @@
   "label": "Amount", 
   "oldfieldname": "amount", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "read_only": 1
  }, 
  {
diff --git a/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt b/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
index 6d308c9..108e985 100644
--- a/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
+++ b/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-14 16:33:26", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:57:24", 
+  "modified": "2013-01-23 17:11:26", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -180,7 +180,8 @@
   "fieldtype": "Currency", 
   "label": "Incoming Rate", 
   "oldfieldname": "incoming_rate", 
-  "oldfieldtype": "Currency"
+  "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()"
  }, 
  {
   "doctype": "DocField", 
@@ -210,6 +211,7 @@
   "label": "Valuation Rate", 
   "oldfieldname": "valuation_rate", 
   "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()", 
   "print_width": "150px", 
   "width": "150px"
  }, 
@@ -219,7 +221,8 @@
   "fieldtype": "Currency", 
   "label": "Stock Value", 
   "oldfieldname": "stock_value", 
-  "oldfieldtype": "Currency"
+  "oldfieldtype": "Currency", 
+  "options": "eval:erpnext.get_currency()"
  }, 
  {
   "doctype": "DocField", 
diff --git a/stock/page/stock_ledger/stock_ledger.js b/stock/page/stock_ledger/stock_ledger.js
index 27e6272..b999dd0 100644
--- a/stock/page/stock_ledger/stock_ledger.js
+++ b/stock/page/stock_ledger/stock_ledger.js
@@ -255,7 +255,7 @@
 	get_tooltip_text: function(label, x, y) {
 		var d = new Date(x);
 		var date = dateutil.obj_to_user(d) + " " + d.getHours() + ":" + d.getMinutes();
-	 	var value = fmt_money(y);
+	 	var value = format_number(y);
 		return value.bold() + " on " + date;
 	}
 });
\ No newline at end of file