From 6382a42dbe7630b7c7fa0b5def29a564a45ea41b Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 23 Jan 2013 10:09:28 +0530 Subject: [PATCH 1/5] more fixes to perms, floats and default enabled / disabled in search --- accounts/doctype/pos_setting/pos_setting.txt | 391 +++++++++--------- .../purchase_invoice/purchase_invoice.txt | 6 +- .../doctype/sales_invoice/sales_invoice.txt | 10 +- .../doctype/purchase_order/purchase_order.txt | 8 +- buying/doctype/supplier/supplier.txt | 6 +- .../supplier_quotation/supplier_quotation.txt | 6 +- hr/doctype/branch/branch.txt | 3 +- patches/december_2012/enable_currencies.py | 16 + patches/patch_list.py | 1 + selling/doctype/customer/customer.txt | 6 +- selling/doctype/quotation/quotation.txt | 10 +- selling/doctype/sales_order/sales_order.txt | 12 +- setup/doctype/company/company.py | 4 +- setup/doctype/company/company.txt | 6 +- setup/doctype/currency/currency.js | 4 + setup/doctype/currency/currency_list.js | 19 + .../global_defaults/global_defaults.py | 6 +- .../global_defaults/global_defaults.txt | 6 +- setup/doctype/setup_control/setup_control.py | 5 + .../terms_and_conditions.txt | 3 +- setup/page/setup/setup.js | 2 +- stock/doctype/delivery_note/delivery_note.txt | 10 +- stock/doctype/item_price/item_price.txt | 66 +-- .../landed_cost_wizard/landed_cost_wizard.txt | 6 +- .../purchase_receipt/purchase_receipt.txt | 8 +- 25 files changed, 330 insertions(+), 290 deletions(-) create mode 100644 patches/december_2012/enable_currencies.py create mode 100644 setup/doctype/currency/currency_list.js diff --git a/accounts/doctype/pos_setting/pos_setting.txt b/accounts/doctype/pos_setting/pos_setting.txt index b4b946f237..a91c44354e 100755 --- a/accounts/doctype/pos_setting/pos_setting.txt +++ b/accounts/doctype/pos_setting/pos_setting.txt @@ -1,230 +1,217 @@ [ { - "owner": "Administrator", + "creation": "2013-01-10 16:34:07", "docstatus": 0, - "creation": "2012-06-11 12:09:53", + "modified": "2013-01-22 16:55:20", "modified_by": "Administrator", - "modified": "2012-07-16 16:27:51" + "owner": "Administrator" }, { - "section_style": "Simple", - "module": "Accounts", - "doctype": "DocType", - "server_code_error": " ", "autoname": "POS/.####", - "name": "__common__", - "colour": "White:FFF", - "_last_update": "1322549700", - "show_in_menu": 0, - "version": 1 + "doctype": "DocType", + "module": "Accounts", + "name": "__common__" }, { + "doctype": "DocField", "name": "__common__", "parent": "POS Setting", - "doctype": "DocField", + "parentfield": "fields", + "parenttype": "DocType", + "permlevel": 0 + }, + { + "doctype": "DocPerm", + "name": "__common__", + "parent": "POS Setting", + "parentfield": "permissions", "parenttype": "DocType", "permlevel": 0, - "parentfield": "fields" - }, - { - "name": "__common__", - "parent": "POS Setting", "read": 1, - "doctype": "DocPerm", - "parenttype": "DocType", "report": 1, - "permlevel": 0, - "parentfield": "permissions" - }, - { - "name": "POS Setting", - "doctype": "DocType" - }, - { - "oldfieldtype": "Link", - "doctype": "DocField", - "label": "User", - "oldfieldname": "user", - "fieldname": "user", - "fieldtype": "Link", - "options": "Profile" - }, - { - "oldfieldtype": "Link", - "doctype": "DocField", - "label": "Territory", - "oldfieldname": "territory", - "fieldname": "territory", - "fieldtype": "Link", - "reqd": 1, - "options": "Territory" - }, - { - "no_copy": 1, - "oldfieldtype": "Select", - "doctype": "DocField", - "label": "Series", - "oldfieldname": "naming_series", - "fieldname": "naming_series", - "fieldtype": "Select", - "reqd": 1 - }, - { - "oldfieldtype": "Select", - "doctype": "DocField", - "label": "Currency", - "oldfieldname": "currency", - "fieldname": "currency", - "fieldtype": "Select", - "reqd": 1, - "options": "link:Currency" - }, - { - "default": "1", - "oldfieldtype": "Currency", - "colour": "White:FFF", - "doctype": "DocField", - "label": "Conversion Rate", - "oldfieldname": "conversion_rate", - "fieldname": "conversion_rate", - "fieldtype": "Float", - "reqd": 1 - }, - { - "oldfieldtype": "Select", - "doctype": "DocField", - "label": "Price List", - "oldfieldname": "price_list_name", - "fieldname": "price_list_name", - "fieldtype": "Select", - "reqd": 1, - "options": "link:Price List" - }, - { - "oldfieldtype": "Link", - "doctype": "DocField", - "label": "Company", - "oldfieldname": "company", - "fieldname": "company", - "fieldtype": "Link", - "reqd": 1, - "options": "Company" - }, - { - "oldfieldtype": "Column Break", - "fieldname": "column_break0", - "fieldtype": "Column Break", - "doctype": "DocField" - }, - { - "oldfieldtype": "Link", - "doctype": "DocField", - "label": "Customer Account", - "oldfieldname": "customer_account", - "fieldname": "customer_account", - "fieldtype": "Link", - "reqd": 0, - "options": "Account" - }, - { - "oldfieldtype": "Link", - "doctype": "DocField", - "label": "Cash/Bank Account", - "oldfieldname": "cash_bank_account", - "fieldname": "cash_bank_account", - "fieldtype": "Link", - "reqd": 1, - "options": "Account" - }, - { - "oldfieldtype": "Link", - "doctype": "DocField", - "label": "Income Account", - "oldfieldname": "income_account", - "fieldname": "income_account", - "fieldtype": "Link", - "reqd": 1, - "options": "Account" - }, - { - "oldfieldtype": "Link", - "doctype": "DocField", - "label": "Warehouse", - "oldfieldname": "warehouse", - "fieldname": "warehouse", - "fieldtype": "Link", - "reqd": 1, - "options": "Warehouse" - }, - { - "oldfieldtype": "Link", - "doctype": "DocField", - "label": "Cost Center", - "oldfieldname": "cost_center", - "fieldname": "cost_center", - "fieldtype": "Link", - "reqd": 1, - "options": "Cost Center" - }, - { - "oldfieldtype": "Link", - "doctype": "DocField", - "label": "Charge", - "oldfieldname": "charge", - "fieldname": "charge", - "fieldtype": "Link", - "options": "Sales Taxes and Charges Master" - }, - { - "print_hide": 1, - "oldfieldtype": "Select", - "doctype": "DocField", - "label": "Letter Head", - "oldfieldname": "letter_head", - "fieldname": "letter_head", - "fieldtype": "Select", - "options": "link:Letter Head" - }, - { - "oldfieldtype": "Link", - "doctype": "DocField", - "label": "Terms and Conditions", - "oldfieldname": "tc_name", - "fieldname": "tc_name", - "fieldtype": "Link", - "options": "Terms and Conditions" - }, - { - "oldfieldtype": "Select", - "doctype": "DocField", - "label": "Select Print Heading", - "oldfieldname": "select_print_heading", - "fieldname": "select_print_heading", - "fieldtype": "Select", - "options": "link:Print Heading", - "in_filter": 0 - }, - { - "write": 1, - "create": 1, - "role": "System Manager", - "doctype": "DocPerm", "submit": 0 }, { - "write": 1, + "doctype": "DocType", + "name": "POS Setting" + }, + { + "doctype": "DocField", + "fieldname": "user", + "fieldtype": "Link", + "label": "User", + "oldfieldname": "user", + "oldfieldtype": "Link", + "options": "Profile" + }, + { + "doctype": "DocField", + "fieldname": "territory", + "fieldtype": "Link", + "label": "Territory", + "oldfieldname": "territory", + "oldfieldtype": "Link", + "options": "Territory", + "reqd": 1 + }, + { + "doctype": "DocField", + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "reqd": 1 + }, + { + "doctype": "DocField", + "fieldname": "currency", + "fieldtype": "Link", + "label": "Currency", + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "reqd": 1 + }, + { + "default": "1", + "doctype": "DocField", + "fieldname": "conversion_rate", + "fieldtype": "Float", + "label": "Conversion Rate", + "oldfieldname": "conversion_rate", + "oldfieldtype": "Currency", + "reqd": 1 + }, + { + "doctype": "DocField", + "fieldname": "price_list_name", + "fieldtype": "Select", + "label": "Price List", + "oldfieldname": "price_list_name", + "oldfieldtype": "Select", + "options": "link:Price List", + "reqd": 1 + }, + { + "doctype": "DocField", + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "reqd": 1 + }, + { + "doctype": "DocField", + "fieldname": "column_break0", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break" + }, + { + "doctype": "DocField", + "fieldname": "customer_account", + "fieldtype": "Link", + "label": "Customer Account", + "oldfieldname": "customer_account", + "oldfieldtype": "Link", + "options": "Account", + "reqd": 0 + }, + { + "doctype": "DocField", + "fieldname": "cash_bank_account", + "fieldtype": "Link", + "label": "Cash/Bank Account", + "oldfieldname": "cash_bank_account", + "oldfieldtype": "Link", + "options": "Account", + "reqd": 1 + }, + { + "doctype": "DocField", + "fieldname": "income_account", + "fieldtype": "Link", + "label": "Income Account", + "oldfieldname": "income_account", + "oldfieldtype": "Link", + "options": "Account", + "reqd": 1 + }, + { + "doctype": "DocField", + "fieldname": "warehouse", + "fieldtype": "Link", + "label": "Warehouse", + "oldfieldname": "warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "reqd": 1 + }, + { + "doctype": "DocField", + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "oldfieldname": "cost_center", + "oldfieldtype": "Link", + "options": "Cost Center", + "reqd": 1 + }, + { + "doctype": "DocField", + "fieldname": "charge", + "fieldtype": "Link", + "label": "Charge", + "oldfieldname": "charge", + "oldfieldtype": "Link", + "options": "Sales Taxes and Charges Master" + }, + { + "doctype": "DocField", + "fieldname": "letter_head", + "fieldtype": "Select", + "label": "Letter Head", + "oldfieldname": "letter_head", + "oldfieldtype": "Select", + "options": "link:Letter Head", + "print_hide": 1 + }, + { + "doctype": "DocField", + "fieldname": "tc_name", + "fieldtype": "Link", + "label": "Terms and Conditions", + "oldfieldname": "tc_name", + "oldfieldtype": "Link", + "options": "Terms and Conditions" + }, + { + "doctype": "DocField", + "fieldname": "select_print_heading", + "fieldtype": "Select", + "in_filter": 0, + "label": "Select Print Heading", + "oldfieldname": "select_print_heading", + "oldfieldtype": "Select", + "options": "link:Print Heading" + }, + { "create": 1, + "doctype": "DocPerm", "role": "System Manager", - "doctype": "DocPerm" + "write": 1 }, { - "write": 1, "create": 1, + "doctype": "DocPerm", "role": "Accounts Manager", - "doctype": "DocPerm" + "write": 1 }, { - "role": "Accounts User", - "doctype": "DocPerm" + "doctype": "DocPerm", + "role": "Accounts User" } ] \ No newline at end of file diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.txt b/accounts/doctype/purchase_invoice/purchase_invoice.txt index 444d1a445f..49e6e1caf1 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 14:56:42", + "modified": "2013-01-22 16:55:20", "modified_by": "Administrator", "owner": "Administrator" }, @@ -238,11 +238,11 @@ { "doctype": "DocField", "fieldname": "currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Currency", "oldfieldname": "currency", "oldfieldtype": "Select", - "options": "link:Currency", + "options": "Currency", "print_hide": 1 }, { diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt index dade4f51d8..18e5e0ad78 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 15:03:42", + "modified": "2013-01-22 16:55:23", "modified_by": "Administrator", "owner": "Administrator" }, @@ -319,9 +319,9 @@ "description": "Select the currency in which price list is maintained", "doctype": "DocField", "fieldname": "price_list_currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Price List Currency", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "reqd": 1 }, @@ -343,11 +343,11 @@ { "doctype": "DocField", "fieldname": "currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Currency", "oldfieldname": "currency", "oldfieldtype": "Select", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "reqd": 1 }, diff --git a/buying/doctype/purchase_order/purchase_order.txt b/buying/doctype/purchase_order/purchase_order.txt index 0bb0b2b410..0dd2a5322f 100644 --- a/buying/doctype/purchase_order/purchase_order.txt +++ b/buying/doctype/purchase_order/purchase_order.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-21 18:19:18", + "creation": "2013-01-22 15:11:37", "docstatus": 0, - "modified": "2013-01-22 14:56:42", + "modified": "2013-01-22 16:55:21", "modified_by": "Administrator", "owner": "Administrator" }, @@ -242,12 +242,12 @@ "description": "Supplier's currency", "doctype": "DocField", "fieldname": "currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Currency", "no_copy": 0, "oldfieldname": "currency", "oldfieldtype": "Select", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "reqd": 1 }, diff --git a/buying/doctype/supplier/supplier.txt b/buying/doctype/supplier/supplier.txt index 14bd2bd10d..370a16e00f 100644 --- a/buying/doctype/supplier/supplier.txt +++ b/buying/doctype/supplier/supplier.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:11", "docstatus": 0, - "modified": "2013-01-22 14:57:25", + "modified": "2013-01-22 16:55:25", "modified_by": "Administrator", "owner": "Administrator" }, @@ -162,10 +162,10 @@ "description": "This currency will get fetched in Purchase transactions of this supplier", "doctype": "DocField", "fieldname": "default_currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Default Currency", "no_copy": 1, - "options": "link:Currency" + "options": "Currency" }, { "description": "Statutory info and other general information about your Supplier", diff --git a/buying/doctype/supplier_quotation/supplier_quotation.txt b/buying/doctype/supplier_quotation/supplier_quotation.txt index d52fe640b6..6b2970b894 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 14:57:25", + "modified": "2013-01-22 16:55:26", "modified_by": "Administrator", "owner": "Administrator" }, @@ -196,12 +196,12 @@ "description": "Supplier's currency", "doctype": "DocField", "fieldname": "currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Currency", "no_copy": 0, "oldfieldname": "currency", "oldfieldtype": "Select", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "reqd": 1 }, diff --git a/hr/doctype/branch/branch.txt b/hr/doctype/branch/branch.txt index b5eb4a3c9f..ea20a1461f 100644 --- a/hr/doctype/branch/branch.txt +++ b/hr/doctype/branch/branch.txt @@ -2,11 +2,12 @@ { "creation": "2013-01-10 16:34:13", "docstatus": 0, - "modified": "2013-01-22 14:18:28", + "modified": "2013-01-22 17:36:37", "modified_by": "Administrator", "owner": "Administrator" }, { + "allow_rename": 1, "autoname": "field:branch", "doctype": "DocType", "document_type": "Master", diff --git a/patches/december_2012/enable_currencies.py b/patches/december_2012/enable_currencies.py new file mode 100644 index 0000000000..ed9860f5de --- /dev/null +++ b/patches/december_2012/enable_currencies.py @@ -0,0 +1,16 @@ +import webnotes + +def execute(): + # get all currencies + webnotes.reload_doc("setup", "doctype", "currency") + clist = [webnotes.conn.get_default("currency")] + for f in webnotes.conn.sql("""select parent, fieldname from tabDocField + where options in ('Currency', 'link:Currency')""", as_dict=1): + if not webnotes.conn.get_value("DocType", f.parent, "issingle"): + clist += [c[0] for c in webnotes.conn.sql("""select distinct `%s` + from `tab%s`""" % (f.fieldname, f.parent))] + + clist = list(set(clist)) + for c in clist: + if c: + webnotes.conn.sql("""update tabCurrency set `enabled`=1 where name=%s""", c) diff --git a/patches/patch_list.py b/patches/patch_list.py index cdaa2ad9a1..8d40839fc4 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -155,4 +155,5 @@ patch_list = [ "patches.january_2013.purchase_price_list", "execute:webnotes.reload_doc('accounts','Print Format','Payment Receipt Voucher')", "patches.january_2013.update_fraction_for_usd", + "patches.january_2013.enable_currencies", ] \ No newline at end of file diff --git a/selling/doctype/customer/customer.txt b/selling/doctype/customer/customer.txt index 0e0b29bd07..e859342ea6 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 15:06:09", + "modified": "2013-01-22 16:54:47", "modified_by": "Administrator", "owner": "Administrator" }, @@ -238,10 +238,10 @@ "description": "This currency will get fetched in Sales transactions of this customer", "doctype": "DocField", "fieldname": "default_currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Default Currency", "no_copy": 1, - "options": "link:Currency", + "options": "Currency", "permlevel": 0 }, { diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt index 5f7c20ec36..72bc7a76f6 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 14:57:22", + "modified": "2013-01-22 16:55:23", "modified_by": "Administrator", "owner": "Administrator" }, @@ -313,9 +313,9 @@ "description": "Select the currency in which price list is maintained", "doctype": "DocField", "fieldname": "price_list_currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Price List Currency", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "reqd": 1 }, @@ -338,12 +338,12 @@ "description": "Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.", "doctype": "DocField", "fieldname": "currency", - "fieldtype": "Select", + "fieldtype": "Link", "in_filter": 1, "label": "Currency", "oldfieldname": "currency", "oldfieldtype": "Select", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "reqd": 1, "search_index": 0, diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt index 47cae4a6ff..159708c905 100644 --- a/selling/doctype/sales_order/sales_order.txt +++ b/selling/doctype/sales_order/sales_order.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-10 16:34:20", + "creation": "2013-01-22 15:24:17", "docstatus": 0, - "modified": "2013-01-22 13:52:58", + "modified": "2013-01-22 16:55:24", "modified_by": "Administrator", "owner": "Administrator" }, @@ -331,9 +331,9 @@ "description": "Select the currency in which price list is maintained", "doctype": "DocField", "fieldname": "price_list_currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Price List Currency", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "reqd": 1 }, @@ -356,11 +356,11 @@ "description": "Customer's currency", "doctype": "DocField", "fieldname": "currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Currency", "oldfieldname": "currency", "oldfieldtype": "Select", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "reqd": 1, "width": "100px" diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py index 124c3e48e9..2aeb96611a 100644 --- a/setup/doctype/company/company.py +++ b/setup/doctype/company/company.py @@ -213,7 +213,9 @@ class DocType: cc = sql("select name from `tabCost Center` where cost_center_name = 'Root' and company_name = '%s'"%(self.doc.name)) if not cc: self.create_default_cost_center() - + + if self.doc.default_currency: + webnotes.conn.set_value("Currency", self.doc.default_currency, "enabled", 1) def on_trash(self): """ diff --git a/setup/doctype/company/company.txt b/setup/doctype/company/company.txt index fc778ceb35..401f9209b2 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 14:55:58", + "modified": "2013-01-22 16:54:47", "modified_by": "Administrator", "owner": "Administrator" }, @@ -86,9 +86,9 @@ { "doctype": "DocField", "fieldname": "default_currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Default Currency", - "options": "link:Currency", + "options": "Currency", "reqd": 1 }, { diff --git a/setup/doctype/currency/currency.js b/setup/doctype/currency/currency.js index 9a18372952..cc0aeb6c8e 100644 --- a/setup/doctype/currency/currency.js +++ b/setup/doctype/currency/currency.js @@ -1,2 +1,6 @@ cur_frm.cscript.refresh = function(doc) { + cur_frm.set_intro(""); + if(!cur_frm.doc.enabled) { + cur_frm.set_intro(wn._("This Currency is disabled. Enable to use in transactions")) + } } \ No newline at end of file diff --git a/setup/doctype/currency/currency_list.js b/setup/doctype/currency/currency_list.js new file mode 100644 index 0000000000..31eadbc3f7 --- /dev/null +++ b/setup/doctype/currency/currency_list.js @@ -0,0 +1,19 @@ +wn.doclistviews['Currency'] = wn.views.ListView.extend({ + init: function(d) { + this._super(d) + this.fields = this.fields.concat([ + "`tabCurrency`.enabled", + ]); + this.stats = this.stats.concat(['enabled']); + this.order_by = "`tabCurrency`.`enabled` desc, `tabCurrency`.modified desc"; + }, + columns: [ + {width: '3%', content: 'check'}, + {width: '5%', content: 'avatar'}, + {width: '3%', content: "enabled"}, + {width: '70%', content: 'name'}, + {width: '20%', content:'modified', + css: {'text-align': 'right', 'color': '#777'}}, + + ] +}); \ No newline at end of file diff --git a/setup/doctype/global_defaults/global_defaults.py b/setup/doctype/global_defaults/global_defaults.py index 042b9a3565..2d57e33f1b 100644 --- a/setup/doctype/global_defaults/global_defaults.py +++ b/setup/doctype/global_defaults/global_defaults.py @@ -65,7 +65,11 @@ class DocType: webnotes.conn.set_default('year_start_date', ysd.strftime('%Y-%m-%d')) webnotes.conn.set_default('year_end_date', \ get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d')) - + + # enable default currency + if self.doc.default_currency: + webnotes.conn.set_value("Currency", self.doc.default_currency, "enabled", 1) + # clear cache webnotes.clear_cache() diff --git a/setup/doctype/global_defaults/global_defaults.txt b/setup/doctype/global_defaults/global_defaults.txt index 2868af411e..d380eef820 100644 --- a/setup/doctype/global_defaults/global_defaults.txt +++ b/setup/doctype/global_defaults/global_defaults.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:23", "docstatus": 0, - "modified": "2013-01-22 14:56:02", + "modified": "2013-01-22 16:54:48", "modified_by": "Administrator", "owner": "Administrator" }, @@ -101,9 +101,9 @@ "default": "INR", "doctype": "DocField", "fieldname": "default_currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Default Currency", - "options": "link:Currency", + "options": "Currency", "reqd": 1 }, { diff --git a/setup/doctype/setup_control/setup_control.py b/setup/doctype/setup_control/setup_control.py index 86cdc8e82e..d8227ade31 100644 --- a/setup/doctype/setup_control/setup_control.py +++ b/setup/doctype/setup_control/setup_control.py @@ -53,6 +53,7 @@ class DocType: }} self.create_records(master_dict) + # Company master_dict = {'Company': { 'company_name':args.get('company_name'), @@ -60,6 +61,10 @@ class DocType: 'default_currency':args.get('currency') }} self.create_records(master_dict) + + # enable default currency + webnotes.conn.set_value("Currency", args.get("currency"), "enabled", 1) + def_args = { 'current_fiscal_year':curr_fiscal_year, diff --git a/setup/doctype/terms_and_conditions/terms_and_conditions.txt b/setup/doctype/terms_and_conditions/terms_and_conditions.txt index 9aa2ba26dc..47a8c4c240 100644 --- a/setup/doctype/terms_and_conditions/terms_and_conditions.txt +++ b/setup/doctype/terms_and_conditions/terms_and_conditions.txt @@ -2,11 +2,12 @@ { "creation": "2013-01-10 16:34:24", "docstatus": 0, - "modified": "2013-01-22 14:57:26", + "modified": "2013-01-22 17:36:24", "modified_by": "Administrator", "owner": "Administrator" }, { + "allow_rename": 1, "autoname": "field:title", "description": "Standard Terms and Conditions that can be added to Sales and Purchases.\n\nExamples:\n\n1. Validity of the offer.\n1. Payment Terms (In Advance, On Credit, part advance etc).\n1. What is extra (or payable by the Customer).\n1. Safety / usage warning.\n1. Warranty if any.\n1. Returns Policy.\n1. Terms of shipping, if applicable.\n1. Ways of addressing disputes, indemnity, liability, etc.\n1. Address and Contact of your Company.", "doctype": "DocType", diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js index aa75893221..c0f3378d41 100644 --- a/setup/page/setup/setup.js +++ b/setup/page/setup/setup.js @@ -19,7 +19,7 @@ wn.module_page["Setup"] = [ { "doctype":"Currency", "label": wn._("Currency"), - "description": wn._("Currency Master") + "description": wn._("Enable / disable currencies.") }, ] }, diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt index 3a7d9bf313..6aa34b631e 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 14:56:00", + "modified": "2013-01-22 16:54:48", "modified_by": "Administrator", "owner": "Administrator" }, @@ -328,9 +328,9 @@ "description": "Select the currency in which price list is maintained", "doctype": "DocField", "fieldname": "price_list_currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Price List Currency", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "read_only": 0, "reqd": 1 @@ -357,11 +357,11 @@ "description": "Customer's Currency", "doctype": "DocField", "fieldname": "currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Currency", "oldfieldname": "currency", "oldfieldtype": "Select", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "read_only": 0, "reqd": 1 diff --git a/stock/doctype/item_price/item_price.txt b/stock/doctype/item_price/item_price.txt index eccae617a8..04d3a88407 100644 --- a/stock/doctype/item_price/item_price.txt +++ b/stock/doctype/item_price/item_price.txt @@ -1,79 +1,79 @@ [ { - "owner": "Administrator", + "creation": "2013-01-21 18:19:14", "docstatus": 0, - "creation": "2013-01-15 18:43:18", + "modified": "2013-01-22 16:54:49", "modified_by": "Administrator", - "modified": "2013-01-17 17:53:42" + "owner": "Administrator" }, { - "read_only": 0, - "istable": 1, "autoname": "RFD/.#####", - "in_create": 1, "doctype": "DocType", + "in_create": 1, + "istable": 1, "module": "Stock", - "name": "__common__" + "name": "__common__", + "read_only": 0 }, { + "doctype": "DocField", "name": "__common__", "parent": "Item Price", - "doctype": "DocField", + "parentfield": "fields", "parenttype": "DocType", - "permlevel": 0, - "parentfield": "fields" + "permlevel": 0 }, { - "name": "Item Price", - "doctype": "DocType" + "doctype": "DocType", + "name": "Item Price" }, { - "oldfieldtype": "Select", "doctype": "DocField", - "label": "Price List Name", - "oldfieldname": "price_list_name", "fieldname": "price_list_name", "fieldtype": "Link", - "search_index": 1, - "reqd": 1, + "in_filter": 1, + "label": "Price List Name", + "oldfieldname": "price_list_name", + "oldfieldtype": "Select", "options": "Price List", - "in_filter": 1 + "reqd": 1, + "search_index": 1 }, { - "oldfieldtype": "Currency", "doctype": "DocField", - "label": "Ref Rate", - "oldfieldname": "ref_rate", "fieldname": "ref_rate", "fieldtype": "Currency", - "search_index": 0, + "in_filter": 1, + "label": "Ref Rate", + "oldfieldname": "ref_rate", + "oldfieldtype": "Currency", "reqd": 0, - "in_filter": 1 + "search_index": 0 }, { - "oldfieldtype": "Select", "doctype": "DocField", + "fieldname": "ref_currency", + "fieldtype": "Link", + "in_filter": 1, "label": "Currency", "oldfieldname": "ref_currency", - "fieldname": "ref_currency", - "fieldtype": "Select", - "search_index": 1, + "oldfieldtype": "Select", + "options": "Currency", "reqd": 1, - "options": "link:Currency", - "in_filter": 1 + "search_index": 1 }, { "description": "Allow this price in sales related forms", "doctype": "DocField", - "label": "For Selling", "fieldname": "selling", - "fieldtype": "Check" + "fieldtype": "Check", + "label": "For Selling" }, { "description": "Allow this price in purchase related forms", "doctype": "DocField", - "label": "For Buying", "fieldname": "buying", - "fieldtype": "Check" + "fieldtype": "Check", + "label": "For Buying" } ] \ No newline at end of file diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt b/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt index fb4483f3e1..4e820a85ff 100644 --- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt +++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:28", "docstatus": 0, - "modified": "2013-01-22 14:56:03", + "modified": "2013-01-22 16:54:49", "modified_by": "Administrator", "owner": "wasim@webnotestech.com" }, @@ -67,9 +67,9 @@ { "doctype": "DocField", "fieldname": "currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Currency", - "options": "link:Currency", + "options": "Currency", "reqd": 1 }, { diff --git a/stock/doctype/purchase_receipt/purchase_receipt.txt b/stock/doctype/purchase_receipt/purchase_receipt.txt index d70b14c1af..df3f6d0d59 100755 --- a/stock/doctype/purchase_receipt/purchase_receipt.txt +++ b/stock/doctype/purchase_receipt/purchase_receipt.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-21 18:19:24", + "creation": "2013-01-22 15:24:18", "docstatus": 0, - "modified": "2013-01-22 14:56:43", + "modified": "2013-01-22 16:55:22", "modified_by": "Administrator", "owner": "Administrator" }, @@ -267,11 +267,11 @@ "description": "Supplier's currency", "doctype": "DocField", "fieldname": "currency", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Currency", "oldfieldname": "currency", "oldfieldtype": "Select", - "options": "link:Currency", + "options": "Currency", "print_hide": 1, "reqd": 1 }, From 597d470e63ef2bcf462bf08e655731e5e82fba56 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 23 Jan 2013 19:39:51 +0530 Subject: [PATCH 2/5] added format_currency and added options to all currency fields --- accounts/doctype/account/account.txt | 5 +- .../bank_reconciliation.js | 4 +- .../bank_reconciliation.txt | 15 +- .../bank_reconciliation_detail.txt | 4 +- .../doctype/budget_detail/budget_detail.txt | 4 +- accounts/doctype/c_form/c_form.txt | 4 +- .../c_form_invoice_detail.txt | 4 +- accounts/doctype/gl_entry/gl_entry.txt | 226 +++++++++--------- .../journal_voucher/journal_voucher.js | 3 +- .../journal_voucher/journal_voucher.txt | 6 +- .../journal_voucher/journal_voucher_list.js | 2 +- .../journal_voucher_detail.txt | 8 +- .../payment_to_invoice_matching_tool.js | 2 + .../payment_to_invoice_matching_tool.txt | 27 ++- ...ayment_to_invoice_matching_tool_detail.txt | 5 +- .../purchase_invoice/purchase_invoice.txt | 37 ++- .../purchase_invoice/purchase_invoice_list.js | 2 +- .../purchase_invoice_advance.txt | 4 +- .../purchase_invoice_item.txt | 8 +- .../purchase_taxes_and_charges.txt | 7 +- .../purchase_taxes_and_charges_master.js | 14 +- .../doctype/sales_invoice/sales_invoice.txt | 16 +- .../sales_invoice/sales_invoice_list.js | 2 +- .../sales_invoice_advance.txt | 4 +- .../sales_invoice_item/sales_invoice_item.txt | 8 +- .../sales_taxes_and_charges.txt | 8 +- .../sales_taxes_and_charges_master.js | 16 +- .../page/accounts_browser/accounts_browser.js | 5 +- .../page/accounts_browser/accounts_browser.py | 2 +- .../financial_statements.js | 13 +- .../purchase_common/purchase_common.js | 11 +- .../doctype/purchase_order/purchase_order.txt | 12 +- .../purchase_order/purchase_order_list.js | 2 +- .../purchase_order_item.txt | 8 +- .../purchase_order_item_supplied.txt | 6 +- .../purchase_receipt_item_supplied.txt | 8 +- .../purchase_request/purchase_request.txt | 4 +- .../supplier_quotation/supplier_quotation.txt | 12 +- .../supplier_quotation_list.js | 2 +- .../supplier_quotation_item.txt | 8 +- hr/doctype/earning_type/earning_type.txt | 4 +- .../employee_external_work_history.txt | 59 ++--- hr/doctype/expense_claim/expense_claim.txt | 4 +- .../expense_claim/expense_claim_list.js | 7 +- .../expense_claim_detail.txt | 76 +++--- hr/doctype/salary_slip/salary_slip.txt | 12 +- hr/doctype/salary_slip/salary_slip_list.js | 9 +- .../salary_slip_deduction.txt | 6 +- .../salary_slip_earning.txt | 6 +- .../salary_structure/salary_structure.txt | 6 +- .../salary_structure/salary_structure_list.js | 9 +- .../salary_structure_deduction.txt | 48 ++-- .../salary_structure_earning.txt | 53 ++-- manufacturing/doctype/bom/bom.txt | 10 +- manufacturing/doctype/bom/bom_list.js | 3 +- .../bom_explosion_item/bom_explosion_item.txt | 4 +- manufacturing/doctype/bom_item/bom_item.txt | 4 +- .../doctype/bom_operation/bom_operation.txt | 6 +- .../production_plan_sales_order.txt | 3 +- .../doctype/workstation/workstation.txt | 14 +- projects/doctype/project/project.txt | 13 +- projects/doctype/project/project_list.js | 5 +- projects/doctype/task/task.js | 2 + projects/doctype/task/task.txt | 20 +- public/js/utils.js | 9 + selling/doctype/customer/customer.txt | 3 +- .../opportunity_item/opportunity_item.txt | 3 +- selling/doctype/quotation/quotation.txt | 8 +- selling/doctype/quotation/quotation_list.js | 2 +- .../doctype/quotation_item/quotation_item.txt | 8 +- .../sales_and_purchase_return_item.txt | 3 +- selling/doctype/sales_common/sales_common.js | 19 +- selling/doctype/sales_order/sales_order.js | 51 ++-- selling/doctype/sales_order/sales_order.txt | 9 +- .../doctype/sales_order/sales_order_list.js | 2 +- .../sales_order_item/sales_order_item.txt | 9 +- selling/doctype/sales_team/sales_team.txt | 6 +- .../authorization_rule/authorization_rule.txt | 134 +++++------ setup/doctype/company/company.txt | 5 +- setup/doctype/target_detail/target_detail.txt | 4 +- stock/doctype/bin/bin.txt | 10 +- stock/doctype/delivery_note/delivery_note.txt | 11 +- .../delivery_note_item/delivery_note_item.txt | 9 +- stock/doctype/item/item.txt | 10 +- stock/doctype/item_price/item_price.txt | 3 +- stock/doctype/item_tax/item_tax.txt | 41 ++-- .../landed_cost_item/landed_cost_item.txt | 48 ++-- .../purchase_receipt/purchase_receipt.txt | 12 +- .../purchase_receipt_item.txt | 11 +- .../sales_and_purchase_return_tool.js | 6 +- .../sales_and_purchase_return_tool.txt | 29 +-- .../doctype/sales_bom_item/sales_bom_item.txt | 4 +- stock/doctype/serial_no/serial_no.txt | 3 +- .../stock_entry_detail/stock_entry_detail.txt | 4 +- .../stock_ledger_entry/stock_ledger_entry.txt | 9 +- stock/page/stock_ledger/stock_ledger.js | 2 +- 96 files changed, 804 insertions(+), 604 deletions(-) diff --git a/accounts/doctype/account/account.txt b/accounts/doctype/account/account.txt index 7fc98381fb..f96e3b2e27 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 4ca9218680..51e62cccb2 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 . + +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 ac5456d995..45eae2004f 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 @@ -55,6 +55,16 @@ "options": "Account", "reqd": 1 }, + { + "doctype": "DocField", + "fieldname": "company", + "fieldtype": "Link", + "hidden": 1, + "label": "Company", + "options": "Company", + "print_hide": 1, + "reqd": 0 + }, { "doctype": "DocField", "fieldname": "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 781a4c8f8b..f4a011de99 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 6d0f31b850..58936bebba 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 60e69db896..4741706e76 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 6eb7b6de74..36d8bbcc05 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 611618788f..433faae999 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 7e1ffda973..444763a7f3 100644 --- a/accounts/doctype/journal_voucher/journal_voucher.js +++ b/accounts/doctype/journal_voucher/journal_voucher.js @@ -151,7 +151,7 @@ cur_frm.cscript.account = function(doc,dt,dn) { 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.validate = function(doc,cdt,cdn) { 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 d1ee1dbd09..74820387b1 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 e31cee8130..0d7bd08ca1 100644 --- a/accounts/doctype/journal_voucher/journal_voucher_list.js +++ b/accounts/doctype/journal_voucher/journal_voucher_list.js @@ -28,7 +28,7 @@ wn.doclistviews['Journal Voucher'] = wn.views.ListView.extend({ { 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 50d862c48e..397eb0cf3e 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 f719db97aa..708c015123 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 5a8331405e..ec3fa5b5be 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 }, @@ -47,6 +48,15 @@ "options": "Account", "reqd": 1 }, + { + "doctype": "DocField", + "fieldname": "company", + "fieldtype": "Link", + "hidden": 1, + "label": "Company", + "options": "Company", + "print_hide": 1 + }, { "doctype": "DocField", "fieldname": "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 562febedb5..dd1a97fdf9 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 49e6e1caf1..b1bd5f22cd 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" }, @@ -73,6 +73,17 @@ "reqd": 1, "search_index": 1 }, + { + "doctype": "DocField", + "fieldname": "supplier", + "fieldtype": "Link", + "hidden": 0, + "label": "Supplier", + "oldfieldname": "supplier", + "oldfieldtype": "Link", + "options": "Supplier", + "print_hide": 1 + }, { "doctype": "DocField", "fieldname": "supplier_name", @@ -346,6 +357,7 @@ "label": "Total Tax", "oldfieldname": "total_tax", "oldfieldtype": "Currency", + "options": "eval:erpnext.get_currency()", "print_hide": 1, "read_only": 1 }, @@ -355,17 +367,6 @@ "fieldtype": "Section Break", "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", @@ -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 7bb25581f3..149f46f3ed 100644 --- a/accounts/doctype/purchase_invoice/purchase_invoice_list.js +++ b/accounts/doctype/purchase_invoice/purchase_invoice_list.js @@ -35,7 +35,7 @@ wn.doclistviews['Purchase Invoice'] = wn.views.ListView.extend({ { width: '18%', content: function(parent, data) { - $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_import)) + $(parent).html(format_currency(data.grand_total_import, data.currency)) }, css: {'text-align':'right'} }, diff --git a/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt b/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt index 6da6a284f3..08ff6fc264 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 e17fbf0e44..a810a451b2 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 50711eb498..976a2159f5 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 fa2c836530..6158e26d8f 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 @@ cur_frm.pformat.purchase_tax_details= function(doc){ var make_row = function(title,val,bold){ var bstart = ''; var bend = ''; return ''+(bold?bstart:'')+title+(bold?bend:'')+'' - +''+doc.currency+'' - +''+val+'' + +'' + +''+format_currency(val, doc.currency)+'' +'' } @@ -44,20 +44,22 @@ cur_frm.pformat.purchase_tax_details= function(doc){ var cl = getchildren('Purchase Taxes and Charges',doc.name,'purchase_tax_details'); // outer table - var out='
'; + var out='
\ +
'; // main table - out +=''+make_row('Net Total',fmt_money(convert_rate(doc.net_total)),1); + out +='
' + +make_row('Net Total',convert_rate(doc.net_total),1); // add rows if(cl.length){ for(var i=0;i' - +'' - +'' + +'' + +'' +'' } @@ -73,24 +73,24 @@ cur_frm.pformat.other_charges= function(doc){ out +='
'+(bold?bstart:'')+title+(bold?bend:'')+''+doc.currency+''+val+''+format_currency(val, doc.currency)+'
'; if(!print_hide_dict['net_total']) { - out +=make_row('Net Total',fmt_money(convert_rate(doc.net_total)),1); + out +=make_row('Net Total',convert_rate(doc.net_total),1); } // add rows if(cl.length){ for(var i=0;i\ - '+ bal[0] + ' ' - + fmt_money(bal[1]) + ''); + treenode.parent.append('' + + format_currency(bal[1], bal[0]) + ''); } } } diff --git a/accounts/page/accounts_browser/accounts_browser.py b/accounts/page/accounts_browser/accounts_browser.py index 4bcf7a4055..1a66fe3819 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 372f5aef51..2fd8afb5db 100644 --- a/accounts/page/financial_statements/financial_statements.js +++ b/accounts/page/financial_statements/financial_statements.js @@ -83,9 +83,11 @@ pscript.stmt_new = function(stmt,company_name,level,period,year) { $i('stmt_tree').innerHTML = 'Refreshing....'; $i('stmt_tree').style.display = 'block'; + var company = sel_val($i('stmt_company')) + var arg = { statement:sel_val($i('stmt_type')) - ,company:sel_val($i('stmt_company')) + ,company:company, ,period:sel_val($i('stmt_period')) ,year:sel_val($i('stmt_fiscal_year')) } @@ -136,9 +138,12 @@ pscript.stmt_new = function(stmt,company_name,level,period,year) { } if(nl[i][0] != 0){ if(nl[i][j]) { - if (i==0) per.innerHTML = (nl[i][j]+'').bold(); - else if(nl[i][0] == 1 || nl[i][0] == 4) per.innerHTML = (cstr(fmt_money(nl[i][j]))+'').bold(); - else per.innerHTML = fmt_money(nl[i][j]) + if (i==0) + per.innerHTML = (nl[i][j]+'').bold(); + else if(nl[i][0] == 1 || nl[i][0] == 4) + per.innerHTML = format_currency(nl[i][j], erpnext.get_currency(company)).bold(); + else + per.innerHTML = format_currency(nl[i][j], erpnext.get_currency(company)) } else per.innerHTML = '-'; } diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js index fcb0b6ab3d..bb513fca74 100644 --- a/buying/doctype/purchase_common/purchase_common.js +++ b/buying/doctype/purchase_common/purchase_common.js @@ -242,8 +242,7 @@ erpnext.buying.BuyingController = erpnext.utils.Controller.extend({ }, get_company_currency: function() { - return (wn.boot.company[this.frm.doc.company].default_currency || - sys_defaults['currency']); + return erpnext.get_currency(this.frm.doc.company); } }); @@ -648,9 +647,9 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname) //prev_total += flt(tax[t].total_amount); // for previous row total if(tax[t].charge_type == 'Actual') - $td(otc,i+1,t+1).innerHTML = fmt_money(tax[t].total_amount); + $td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company)); else - $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +fmt_money(tax[t].total_amount); + $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company)); if (tax[t].category != "Total"){ item_tax += tax[t].total_amount; @@ -676,9 +675,9 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname) //prev_total += flt(tax[t].total_amount); // for previous row total if(tax[t].charge_type == 'Actual') - $td(otc,i+1,t+1).innerHTML = fmt_money(tax[t].total_amount); + $td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company)); else - $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +fmt_money(tax[t].total_amount); + $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company)); if (tax[t].category != "Total"){ item_tax -= tax[t].total_amount; diff --git a/buying/doctype/purchase_order/purchase_order.txt b/buying/doctype/purchase_order/purchase_order.txt index 0dd2a5322f..eed812fa35 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 762c63596a..387d24dceb 100644 --- a/buying/doctype/purchase_order/purchase_order_list.js +++ b/buying/doctype/purchase_order/purchase_order_list.js @@ -23,7 +23,7 @@ wn.doclistviews['Purchase Order'] = wn.views.ListView.extend({ { width: '18%', content: function(parent, data) { - $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_import)) + $(parent).html(format_currency(data.grand_total_import, data.currency)) }, css: {'text-align':'right'} }, diff --git a/buying/doctype/purchase_order_item/purchase_order_item.txt b/buying/doctype/purchase_order_item/purchase_order_item.txt index 6e93ee679c..de70973607 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 742dbb8faf..d78763e963 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 7c36bba079..f7a0f8ce10 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 e6fa16ea1e..6d980538e1 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 6b2970b894..709e2cdc43 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 60b1f5285d..e7e6a5b19d 100644 --- a/buying/doctype/supplier_quotation/supplier_quotation_list.js +++ b/buying/doctype/supplier_quotation/supplier_quotation_list.js @@ -20,7 +20,7 @@ wn.doclistviews['Supplier Quotation'] = wn.views.ListView.extend({ { width: '18%', content: function(parent, data) { - $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_import)) + $(parent).html(format_currency(data.grand_total_import, data.currency)) }, css: {'text-align':'right'} }, diff --git a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt index 4424da31b8..44323791f4 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 65a9393533..18cac6821a 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 8587320517..8c822efdcc 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 a1331fa931..ea52df871d 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 19d54278d4..c3c81b12b4 100644 --- a/hr/doctype/expense_claim/expense_claim_list.js +++ b/hr/doctype/expense_claim/expense_claim_list.js @@ -17,8 +17,7 @@ wn.doclistviews['Expense Claim'] = wn.views.ListView.extend({ this._super(data); data.posting_date = wn.datetime.str_to_user(data.posting_date); data.employee_name = data.employee_name + ' claimed ' - + wn.boot.company[data.company].default_currency + ' ' - + fmt_money(data.total_claimed_amount); + + format_currency(data.total_claimed_amount, erpnext.get_currency(data.company)); }, columns: [ @@ -31,8 +30,8 @@ wn.doclistviews['Expense Claim'] = wn.views.ListView.extend({ { width: '12%', content: function(parent, data) { - $(parent).html(wn.boot.company[data.company].default_currency - + ' ' + fmt_money(data.total_sanctioned_amount)); + $(parent).html(format_currency(data.total_sanctioned_amount, + erpnext.get_currency(data.company)); }, css: {'text-align': 'right'}, }, diff --git a/hr/doctype/expense_claim_detail/expense_claim_detail.txt b/hr/doctype/expense_claim_detail/expense_claim_detail.txt index f28811f74a..2d6a23c207 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 5ab72040c2..0f68971c5e 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 0763e2792f..dc0b83669d 100644 --- a/hr/doctype/salary_slip/salary_slip_list.js +++ b/hr/doctype/salary_slip/salary_slip_list.js @@ -33,13 +33,8 @@ wn.doclistviews['Salary Slip'] = wn.views.ListView.extend({ { width: '16%', content: function(parent, data) { - $(parent).html( - ( - data.company - ? wn.boot.company[data.company].default_currency - : sys_defaults.currency - ) - + ' ' + fmt_money(data.rounded_total)); + $(parent).html(format_currency(data.rounded_total, + erpnext.get_currency(data.company))); }, css: {'text-align': 'right'}, }, diff --git a/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt b/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt index 8586bf2d7f..545fe94ab1 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 5280cd83cc..aafab56a52 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 2800aeb24d..e30d9a2d16 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 77259b5d13..53182edf4b 100644 --- a/hr/doctype/salary_structure/salary_structure_list.js +++ b/hr/doctype/salary_structure/salary_structure_list.js @@ -33,13 +33,8 @@ wn.doclistviews['Salary Structure'] = wn.views.ListView.extend({ { width: '15%', content: function(parent, data) { - $(parent).html( - ( - data.company - ? wn.boot.company[data.company].default_currency - : sys_defaults.currency - ) - + ' ' + fmt_money(data.net_pay)); + $(parent).html(format_currency(data.net_pay, + erpnext.get_currency(data.company))); }, css: {'text-align': 'right'}, }, diff --git a/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt b/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt index 1f4d246ae7..262cf95b4f 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 93961d569f..25d4294bb1 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 dbf835cc63..c960494c37 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 8e355f38d7..59e34d0b91 100644 --- a/manufacturing/doctype/bom/bom_list.js +++ b/manufacturing/doctype/bom/bom_list.js @@ -36,8 +36,7 @@ wn.doclistviews['BOM'] = wn.views.ListView.extend({ { width: '20%', content: function(parent, data) { - $(parent).html(sys_defaults.currency + " " - + fmt_money(data.total_cost)); + $(parent).html(format_currency(data.total_cost)); }, css: {'text-align': 'right'}, }, diff --git a/manufacturing/doctype/bom_explosion_item/bom_explosion_item.txt b/manufacturing/doctype/bom_explosion_item/bom_explosion_item.txt index 08ab2de6fe..fb0961141c 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 fd3c44d698..1da7f0dc1a 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 c31c57af4f..e722bbed72 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 193a041796..de011dcb40 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 cba3227a11..8dcb805b80 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 2c277b2bc1..4d089bd02e 100644 --- a/projects/doctype/project/project.txt +++ b/projects/doctype/project/project.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:17", "docstatus": 0, - "modified": "2013-01-22 14:56:41", + "modified": "2013-01-23 17:11:21", "modified_by": "Administrator", "owner": "Administrator" }, @@ -196,6 +196,13 @@ "oldfieldtype": "Text Editor", "search_index": 0 }, + { + "doctype": "DocField", + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company" + }, { "doctype": "DocField", "fieldname": "project_details", @@ -212,6 +219,7 @@ "no_copy": 0, "oldfieldname": "project_value", "oldfieldtype": "Currency", + "options": "eval:erpnext.get_currency()", "reqd": 0, "search_index": 0 }, @@ -223,6 +231,7 @@ "no_copy": 0, "oldfieldname": "est_material_cost", "oldfieldtype": "Currency", + "options": "eval:erpnext.get_currency()", "search_index": 0 }, { @@ -241,6 +250,7 @@ "no_copy": 0, "oldfieldname": "gross_margin_value", "oldfieldtype": "Currency", + "options": "eval:erpnext.get_currency()", "reqd": 0, "search_index": 0 }, @@ -252,6 +262,7 @@ "no_copy": 0, "oldfieldname": "per_gross_margin", "oldfieldtype": "Currency", + "options": "eval:erpnext.get_currency()", "reqd": 0, "search_index": 0 }, diff --git a/projects/doctype/project/project_list.js b/projects/doctype/project/project_list.js index 9adbe721f9..e0fc3786b3 100644 --- a/projects/doctype/project/project_list.js +++ b/projects/doctype/project/project_list.js @@ -34,15 +34,14 @@ wn.doclistviews['Project'] = wn.views.ListView.extend({ { width: '15%', content: function(parent, data) { - $(parent).html(sys_defaults.currency + " " - + fmt_money(data.project_value)); + $(parent).html(format_currency(data.project_value)); }, css: {'text-align': 'right'}, }, { width: '10%', content: function(parent, data) { - $(parent).html(fmt_money(data.per_gross_margin) + " %"); + $(parent).html(format_number(data.per_gross_margin) + " %"); }, css: {'text-align': 'right'}, }, diff --git a/projects/doctype/task/task.js b/projects/doctype/task/task.js index 20629c5fbf..472ca6b98c 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 8573b97d31..96d6e41ce1 100644 --- a/projects/doctype/task/task.txt +++ b/projects/doctype/task/task.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:17", "docstatus": 0, - "modified": "2013-01-22 14:57:26", + "modified": "2013-01-23 17:11:21", "modified_by": "Administrator", "owner": "Administrator" }, @@ -170,7 +170,8 @@ "fieldtype": "Currency", "label": "Allocated Budget", "oldfieldname": "allocated_budget", - "oldfieldtype": "Currency" + "oldfieldtype": "Currency", + "options": "eval:erpnext.get_currency()" }, { "doctype": "DocField", @@ -203,7 +204,8 @@ "fieldtype": "Currency", "label": "Actual Budget", "oldfieldname": "actual_budget", - "oldfieldtype": "Currency" + "oldfieldtype": "Currency", + "options": "eval:erpnext.get_currency()" }, { "doctype": "DocField", @@ -231,6 +233,18 @@ "oldfieldname": "closing_date", "oldfieldtype": "Date" }, + { + "doctype": "DocField", + "fieldname": "column_break_22", + "fieldtype": "Column Break" + }, + { + "doctype": "DocField", + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company" + }, { "doctype": "DocField", "fieldname": "file_list", diff --git a/public/js/utils.js b/public/js/utils.js index 436c532d82..06d3a53c5d 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 e859342ea6..a907bdac23 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 923546d291..8d80e8b01f 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 72bc7a76f6..ca788d4baa 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 8530629a13..55cbc1ddf0 100644 --- a/selling/doctype/quotation/quotation_list.js +++ b/selling/doctype/quotation/quotation_list.js @@ -31,7 +31,7 @@ wn.doclistviews['Quotation'] = wn.views.ListView.extend({ { width: '18%', content: function(parent, data) { - $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_export)) + $(parent).html(format_currency(data.grand_total_export, data.currency)) }, css: {'text-align':'right'} }, diff --git a/selling/doctype/quotation_item/quotation_item.txt b/selling/doctype/quotation_item/quotation_item.txt index 13b99665af..49f9b65a4c 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 7cc64425de..eb7bc29778 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 4ceac9e41d..50b97a2b55 100644 --- a/selling/doctype/sales_common/sales_common.js +++ b/selling/doctype/sales_common/sales_common.js @@ -172,23 +172,28 @@ cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) { unhide_field(['price_list_currency', 'plc_conversion_rate']); if (pl_currency.length==1) { - if (doc.price_list_currency != pl_currency[0]) set_multiple(cdt, cdn, {price_list_currency:pl_currency[0]}); + if (doc.price_list_currency != pl_currency[0]) + set_multiple(cdt, cdn, {price_list_currency:pl_currency[0]}); if (pl_currency[0] == doc.currency) { - if(doc.plc_conversion_rate != doc.conversion_rate) set_multiple(cdt, cdn, {plc_conversion_rate:doc.conversion_rate}); + if(doc.plc_conversion_rate != doc.conversion_rate) + set_multiple(cdt, cdn, {plc_conversion_rate:doc.conversion_rate}); hide_field(['price_list_currency', 'plc_conversion_rate']); } else if (pl_currency[0] == r.message[1]) { - if (doc.plc_conversion_rate != 1) set_multiple(cdt, cdn, {plc_conversion_rate:1}) + if (doc.plc_conversion_rate != 1) + set_multiple(cdt, cdn, {plc_conversion_rate:1}) hide_field(['price_list_currency', 'plc_conversion_rate']); } } if (r.message[1] == doc.currency) { - if (doc.conversion_rate != 1) set_multiple(cdt, cdn, {conversion_rate:1}); + if (doc.conversion_rate != 1) + set_multiple(cdt, cdn, {conversion_rate:1}); hide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']); } else unhide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']); if (r.message[1] == doc.price_list_currency) { - if (doc.plc_conversion_rate != 1) set_multiple(cdt, cdn, {plc_conversion_rate:1}); + if (doc.plc_conversion_rate != 1) + set_multiple(cdt, cdn, {plc_conversion_rate:1}); hide_field('plc_conversion_rate'); } else unhide_field('plc_conversion_rate'); @@ -573,9 +578,9 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname) total += flt(tax[t].tax_amount); // for adding total to previous amount if(tax[t].charge_type == 'Actual') - $td(otc,i+1,t+1).innerHTML = fmt_money(tax[t].total_amount); + $td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company)); else - $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +fmt_money(tax[t].total_amount); + $td(otc,i+1,t+1).innerHTML = '('+format_number(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company)); } } diff --git a/selling/doctype/sales_order/sales_order.js b/selling/doctype/sales_order/sales_order.js index 607b132b9b..55854b5b92 100644 --- a/selling/doctype/sales_order/sales_order.js +++ b/selling/doctype/sales_order/sales_order.js @@ -27,8 +27,6 @@ wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_ wn.require('app/utilities/doctype/sms_control/sms_control.js'); -// ONLOAD -// ================================================================================================ cur_frm.cscript.onload = function(doc, cdt, cdn) { if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'}); if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()}); @@ -148,7 +146,6 @@ cur_frm.cscript.pull_quotation_details = function(doc,dt,dn) { } -//================ create new contact ============================================================================ cur_frm.cscript.new_contact = function(){ tn = wn.model.make_new_doc_and_get_name('Contact'); locals['Contact'][tn].is_customer = 1; @@ -156,11 +153,6 @@ cur_frm.cscript.new_contact = function(){ loaddoc('Contact', tn); } -// DOCTYPE TRIGGERS -// ================================================================================================ - - -// ***************** Get project name ***************** cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) { var cond = ''; if(doc.customer) cond = '(`tabProject`.customer = "'+doc.customer+'" OR IFNULL(`tabProject`.customer,"")="") AND'; @@ -171,20 +163,22 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) { } -// *************** Customized link query for QUOTATION ***************************** cur_frm.fields_dict['quotation_no'].get_query = function(doc) { var cond=''; - if(doc.order_type) cond = ' ifnull(`tabQuotation`.order_type, "") = "'+doc.order_type+'" and'; - if(doc.customer) cond += ' ifnull(`tabQuotation`.customer, "") = "'+doc.customer+'" and'; + if(doc.order_type) cond = ' ifnull(`tabQuotation`.order_type, "") = "' + +doc.order_type+'" and'; + if(doc.customer) cond += ' ifnull(`tabQuotation`.customer, "") = "' + +doc.customer+'" and'; - return repl('SELECT DISTINCT name, customer, transaction_date FROM `tabQuotation` WHERE `tabQuotation`.company = "' + doc.company + '" and `tabQuotation`.`docstatus` = 1 and `tabQuotation`.status != "Order Lost" and %(cond)s `tabQuotation`.%(key)s LIKE "%s" ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond}); + return repl('SELECT DISTINCT name, customer, transaction_date FROM `tabQuotation` \ + WHERE `tabQuotation`.company = "' + + doc.company + '" and `tabQuotation`.`docstatus` = 1 \ + and `tabQuotation`.status != "Order Lost" \ + and %(cond)s `tabQuotation`.%(key)s LIKE "%s" \ + ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond}); } -// SALES ORDER DETAILS TRIGGERS -// ================================================================================================ - -// ***************** Get available qty in warehouse of item selected **************** cur_frm.cscript.reserved_warehouse = function(doc, cdt , cdn) { var d = locals[cdt][cdn]; if (d.reserved_warehouse) { @@ -222,7 +216,6 @@ cur_frm.cscript['Make Maintenance Schedule'] = function() { } } -//------------ make maintenance visit ------------ cur_frm.cscript.make_maintenance_visit = function() { var doc = cur_frm.doc; @@ -251,8 +244,6 @@ cur_frm.cscript.make_maintenance_visit = function() { } } -// make indent -// ================================================================================================ cur_frm.cscript['Make Purchase Request'] = function() { var doc = cur_frm.doc; if (doc.docstatus == 1) { @@ -272,8 +263,6 @@ cur_frm.cscript['Make Purchase Request'] = function() { } -// MAKE DELIVERY NOTE -// ================================================================================================ cur_frm.cscript['Make Delivery Note'] = function() { var doc = cur_frm.doc; if (doc.docstatus == 1) { @@ -293,8 +282,6 @@ cur_frm.cscript['Make Delivery Note'] = function() { } -// MAKE SALES INVOICE -// ================================================================================================ cur_frm.cscript['Make Sales Invoice'] = function() { var doc = cur_frm.doc; @@ -312,36 +299,36 @@ cur_frm.cscript['Make Sales Invoice'] = function() { } -// STOP SALES ORDER -// ================================================================================================== cur_frm.cscript['Stop Sales Order'] = function() { var doc = cur_frm.doc; var check = confirm("Are you sure you want to STOP " + doc.name); if (check) { - $c('runserverobj', args={'method':'stop_sales_order', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) { + $c('runserverobj', { + 'method':'stop_sales_order', + 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name)) + }, function(r,rt) { cur_frm.refresh(); }); } } -// UNSTOP SALES ORDER -// ================================================================================================== cur_frm.cscript['Unstop Sales Order'] = function() { var doc = cur_frm.doc; var check = confirm("Are you sure you want to UNSTOP " + doc.name); if (check) { - $c('runserverobj', args={'method':'unstop_sales_order', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) { + $c('runserverobj', { + 'method':'unstop_sales_order', + 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name)) + }, function(r,rt) { cur_frm.refresh(); }); } } -//get query select Territory -//======================================================================================================================= cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) { return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50'; } @@ -350,4 +337,4 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) { if(cint(wn.boot.notification_settings.sales_order)) { cur_frm.email_doc(wn.boot.notification_settings.sales_order_message); } -} +}; \ No newline at end of file diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt index 159708c905..1c543d45cb 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 a386f3537e..16050c95f2 100644 --- a/selling/doctype/sales_order/sales_order_list.js +++ b/selling/doctype/sales_order/sales_order_list.js @@ -24,7 +24,7 @@ wn.doclistviews['Sales Order'] = wn.views.ListView.extend({ { width: '18%', content: function(parent, data) { - $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_export)) + $(parent).html(format_currency(data.grand_total_export, data.currency)) }, css: {'text-align':'right'} }, diff --git a/selling/doctype/sales_order_item/sales_order_item.txt b/selling/doctype/sales_order_item/sales_order_item.txt index bf2b37dded..b32e23f392 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 01f5260f57..d57929f28f 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 c5949c0b38..9814f5268d 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 401f9209b2..9f3ce7504c 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 b121f990ad..21b632398d 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 ff8d431130..cf3fbb17dc 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 6aa34b631e..4d95396023 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 282747e832..e2c6fbf7b3 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 e2903babec..d5ab5a4b08 100644 --- a/stock/doctype/item/item.txt +++ b/stock/doctype/item/item.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-21 18:19:22", "docstatus": 0, - "modified": "2013-01-22 14:47:00", + "modified": "2013-01-23 17:00:07", "modified_by": "Administrator", "owner": "Administrator" }, @@ -381,7 +381,7 @@ "description": "Buying Cost will be updated from Purchase Orders and Purchase Receipts.
The buying cost will calculated by moving average method.", "doctype": "DocField", "fieldname": "buying_cost", - "fieldtype": "Currency", + "fieldtype": "Float", "label": "Buying Cost", "no_copy": 1, "oldfieldname": "buying_cost", @@ -392,7 +392,7 @@ "depends_on": "eval:doc.is_purchase_item==\"Yes\"", "doctype": "DocField", "fieldname": "last_purchase_rate", - "fieldtype": "Currency", + "fieldtype": "Float", "label": "Last Purchase Rate", "no_copy": 1, "oldfieldname": "last_purchase_rate", @@ -403,7 +403,7 @@ "depends_on": "eval:doc.is_purchase_item==\"Yes\"", "doctype": "DocField", "fieldname": "standard_rate", - "fieldtype": "Currency", + "fieldtype": "Float", "label": "Standard Rate", "oldfieldname": "standard_rate", "oldfieldtype": "Currency" @@ -525,7 +525,7 @@ "depends_on": "eval:doc.is_sales_item==\"Yes\"", "doctype": "DocField", "fieldname": "sales_rate", - "fieldtype": "Currency", + "fieldtype": "Float", "hidden": 1, "label": "Sales Rate", "oldfieldname": "sales_rate", diff --git a/stock/doctype/item_price/item_price.txt b/stock/doctype/item_price/item_price.txt index 04d3a88407..687a35a07d 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 e4e26c308f..a0bfb57595 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 90fc03fb9b..b299a27b69 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 df3f6d0d59..7851133e33 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 d0157008af..12619b0ca2 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 138d19bc97..2dd2e71cb1 100644 --- a/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js +++ b/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js @@ -14,6 +14,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +cur_frm.add_fetch("delivery_note_no", "company", "company"); +cur_frm.add_fetch("sales_invoice_no", "company", "company"); +cur_frm.add_fetch("purchase_receipt_no", "company", "company"); + // Onload //------------------------------- cur_frm.cscript.onload = function(doc,dt,dn){ @@ -217,7 +221,7 @@ cur_frm.cscript.make_jv = function(doc, dr_or_cr, children) { for(var i=0; i Date: Wed, 23 Jan 2013 19:52:04 +0530 Subject: [PATCH 3/5] moved patch --- patches/{december_2012 => january_2013}/enable_currencies.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename patches/{december_2012 => january_2013}/enable_currencies.py (100%) diff --git a/patches/december_2012/enable_currencies.py b/patches/january_2013/enable_currencies.py similarity index 100% rename from patches/december_2012/enable_currencies.py rename to patches/january_2013/enable_currencies.py From c3c67d31ec2a1bef3692c9e755fac418320bf548 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 23 Jan 2013 19:57:35 +0530 Subject: [PATCH 4/5] merge fix --- .../payment_to_invoice_matching_tool.txt | 1 + 1 file changed, 1 insertion(+) 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 10d946bf38..a1a5fd503d 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 @@ -56,6 +56,7 @@ "label": "Company", "options": "Company", "print_hide": 1 + }, { "doctype": "DocField", "fieldname": "account_type", From 363e923b8079783caf8d2df03d651aeee5a31a5f Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 23 Jan 2013 22:26:45 +0530 Subject: [PATCH 5/5] expense claim list bugfix --- hr/doctype/expense_claim/expense_claim_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hr/doctype/expense_claim/expense_claim_list.js b/hr/doctype/expense_claim/expense_claim_list.js index c3c81b12b4..4e5a0dc25a 100644 --- a/hr/doctype/expense_claim/expense_claim_list.js +++ b/hr/doctype/expense_claim/expense_claim_list.js @@ -31,7 +31,7 @@ wn.doclistviews['Expense Claim'] = wn.views.ListView.extend({ width: '12%', content: function(parent, data) { $(parent).html(format_currency(data.total_sanctioned_amount, - erpnext.get_currency(data.company)); + erpnext.get_currency(data.company))); }, css: {'text-align': 'right'}, },