From a27cca97b5b8dac0d7df85823dc4d1899d3d7476 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 20 May 2015 15:43:17 +0530 Subject: [PATCH 01/15] [rename] POS Setting > POS Profile #3271 --- .../accounts/doctype/pos_profile/__init__.py | 0 .../pos_profile.js} | 4 +- .../doctype/pos_profile/pos_profile.json | 263 ++++++++++++++++++ .../pos_profile.py} | 10 +- .../test_pos_profile.py} | 5 +- .../accounts/doctype/pos_setting/README.md | 1 - .../accounts/doctype/pos_setting/__init__.py | 1 - .../doctype/pos_setting/pos_setting.json | 263 ------------------ .../doctype/pos_setting/test_records.json | 1 - .../doctype/sales_invoice/sales_invoice.py | 24 +- .../sales_invoice/test_sales_invoice.py | 18 +- erpnext/accounts/page/pos/pos.js | 2 +- .../change_log/current/rename_pos_setting.md | 1 + erpnext/config/accounts.py | 2 +- erpnext/patches.txt | 1 + erpnext/patches/v5_0/rename_pos_setting.py | 5 + erpnext/public/js/feature_setup.js | 2 +- erpnext/stock/get_item_details.py | 24 +- 18 files changed, 316 insertions(+), 311 deletions(-) create mode 100644 erpnext/accounts/doctype/pos_profile/__init__.py rename erpnext/accounts/doctype/{pos_setting/pos_setting.js => pos_profile/pos_profile.js} (94%) create mode 100644 erpnext/accounts/doctype/pos_profile/pos_profile.json rename erpnext/accounts/doctype/{pos_setting/pos_setting.py => pos_profile/pos_profile.py} (88%) mode change 100755 => 100644 rename erpnext/accounts/doctype/{pos_setting/test_pos_setting.py => pos_profile/test_pos_profile.py} (60%) delete mode 100644 erpnext/accounts/doctype/pos_setting/README.md delete mode 100644 erpnext/accounts/doctype/pos_setting/__init__.py delete mode 100755 erpnext/accounts/doctype/pos_setting/pos_setting.json delete mode 100644 erpnext/accounts/doctype/pos_setting/test_records.json create mode 100644 erpnext/change_log/current/rename_pos_setting.md create mode 100644 erpnext/patches/v5_0/rename_pos_setting.py diff --git a/erpnext/accounts/doctype/pos_profile/__init__.py b/erpnext/accounts/doctype/pos_profile/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.js b/erpnext/accounts/doctype/pos_profile/pos_profile.js similarity index 94% rename from erpnext/accounts/doctype/pos_setting/pos_setting.js rename to erpnext/accounts/doctype/pos_profile/pos_profile.js index db5fec128d..83643fe663 100755 --- a/erpnext/accounts/doctype/pos_setting/pos_setting.js +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.js @@ -1,13 +1,13 @@ // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt -frappe.ui.form.on("POS Setting", "onload", function(frm) { +frappe.ui.form.on("POS Profile", "onload", function(frm) { frm.set_query("selling_price_list", function() { return { filter: { selling: 1 } }; }); frm.call({ - method: "erpnext.accounts.doctype.pos_setting.pos_setting.get_series", + method: "erpnext.accounts.doctype.pos_profile.pos_profile.get_series", callback: function(r) { if(!r.exc) { set_field_options("naming_series", r.message); diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json new file mode 100644 index 0000000000..ad224f1908 --- /dev/null +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json @@ -0,0 +1,263 @@ +{ + "allow_rename": 0, + "autoname": "hash", + "creation": "2013-05-24 12:15:51", + "docstatus": 0, + "doctype": "DocType", + "fields": [ + { + "fieldname": "user", + "fieldtype": "Link", + "in_list_view": 1, + "label": "User", + "oldfieldname": "user", + "oldfieldtype": "Link", + "options": "User", + "permlevel": 0, + "read_only": 0 + }, + { + "description": "", + "fieldname": "territory", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Territory", + "oldfieldname": "territory", + "oldfieldtype": "Link", + "options": "Territory", + "permlevel": 0, + "read_only": 0, + "reqd": 1 + }, + { + "fieldname": "naming_series", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "[Select]", + "permlevel": 0, + "read_only": 0, + "reqd": 1 + }, + { + "fieldname": "currency", + "fieldtype": "Link", + "in_list_view": 0, + "label": "Currency", + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "permlevel": 0, + "read_only": 0, + "reqd": 1 + }, + { + "fieldname": "selling_price_list", + "fieldtype": "Link", + "label": "Price List", + "oldfieldname": "price_list_name", + "oldfieldtype": "Select", + "options": "Price List", + "permlevel": 0, + "read_only": 0, + "reqd": 0 + }, + { + "fieldname": "company", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Company", + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "permlevel": 0, + "read_only": 0, + "reqd": 1 + }, + { + "fieldname": "column_break0", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "read_only": 0 + }, + { + "default": "1", + "description": "Create Stock Ledger Entries when you submit a Sales Invoice", + "fieldname": "update_stock", + "fieldtype": "Check", + "label": "Update Stock", + "permlevel": 0, + "reqd": 0 + }, + { + "fieldname": "customer", + "fieldtype": "Link", + "in_list_view": 0, + "label": "Customer", + "oldfieldname": "customer_account", + "oldfieldtype": "Link", + "options": "Customer", + "permlevel": 0, + "read_only": 0, + "reqd": 0 + }, + { + "fieldname": "cash_bank_account", + "fieldtype": "Link", + "label": "Cash/Bank Account", + "oldfieldname": "cash_bank_account", + "oldfieldtype": "Link", + "options": "Account", + "permlevel": 0, + "read_only": 0, + "reqd": 1 + }, + { + "fieldname": "income_account", + "fieldtype": "Link", + "label": "Income Account", + "oldfieldname": "income_account", + "oldfieldtype": "Link", + "options": "Account", + "permlevel": 0, + "read_only": 0, + "reqd": 1 + }, + { + "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", + "fieldname": "expense_account", + "fieldtype": "Link", + "hidden": 0, + "label": "Expense Account", + "options": "Account", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "reqd": 0 + }, + { + "fieldname": "warehouse", + "fieldtype": "Link", + "label": "Warehouse", + "oldfieldname": "warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "permlevel": 0, + "read_only": 0, + "reqd": 0 + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "oldfieldname": "cost_center", + "oldfieldtype": "Link", + "options": "Cost Center", + "permlevel": 0, + "read_only": 0, + "reqd": 1 + }, + { + "fieldname": "taxes_and_charges", + "fieldtype": "Link", + "label": "Taxes and Charges", + "oldfieldname": "charge", + "oldfieldtype": "Link", + "options": "Sales Taxes and Charges Template", + "permlevel": 0, + "read_only": 0 + }, + { + "fieldname": "write_off_account", + "fieldtype": "Link", + "label": "Write Off Account", + "options": "Account", + "permlevel": 0, + "precision": "", + "reqd": 1 + }, + { + "fieldname": "write_off_cost_center", + "fieldtype": "Link", + "label": "Write Off Cost Center", + "options": "Cost Center", + "permlevel": 0, + "precision": "", + "reqd": 1 + }, + { + "allow_on_submit": 1, + "fieldname": "letter_head", + "fieldtype": "Link", + "label": "Letter Head", + "oldfieldname": "letter_head", + "oldfieldtype": "Select", + "options": "Letter Head", + "permlevel": 0, + "print_hide": 1, + "read_only": 0 + }, + { + "fieldname": "tc_name", + "fieldtype": "Link", + "label": "Terms and Conditions", + "oldfieldname": "tc_name", + "oldfieldtype": "Link", + "options": "Terms and Conditions", + "permlevel": 0, + "read_only": 0 + }, + { + "allow_on_submit": 1, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "in_filter": 0, + "label": "Print Heading", + "oldfieldname": "select_print_heading", + "oldfieldtype": "Select", + "options": "Print Heading", + "permlevel": 0, + "read_only": 0 + } + ], + "icon": "icon-cog", + "idx": 1, + "modified": "2015-05-20 05:38:44.482696", + "modified_by": "Administrator", + "module": "Accounts", + "name": "POS Profile", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "share": 1, + "submit": 0, + "write": 1 + }, + { + "apply_user_permissions": 1, + "delete": 0, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "submit": 0 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "user" +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py old mode 100755 new mode 100644 similarity index 88% rename from erpnext/accounts/doctype/pos_setting/pos_setting.py rename to erpnext/accounts/doctype/pos_profile/pos_profile.py index 0a80061ea6..eeb2bcfc30 --- a/erpnext/accounts/doctype/pos_setting/pos_setting.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -8,22 +8,22 @@ from frappe.utils import cint from frappe.model.document import Document -class POSSetting(Document): +class POSProfile(Document): def validate(self): self.check_for_duplicate() self.validate_expense_account() self.validate_all_link_fields() def check_for_duplicate(self): - res = frappe.db.sql("""select name, user from `tabPOS Setting` + res = frappe.db.sql("""select name, user from `tabPOS Profile` where ifnull(user, '') = %s and name != %s and company = %s""", (self.user, self.name, self.company)) if res: if res[0][1]: - msgprint(_("POS Setting {0} already created for user: {1} and company {2}").format(res[0][0], + msgprint(_("POS Profile {0} already created for user: {1} and company {2}").format(res[0][0], res[0][1], self.company), raise_exception=1) else: - msgprint(_("Global POS Setting {0} already created for company {1}").format(res[0][0], + msgprint(_("Global POS Profile {0} already created for company {1}").format(res[0][0], self.company), raise_exception=1) def validate_expense_account(self): @@ -57,7 +57,7 @@ class POSSetting(Document): condition = "" pos_view_users = frappe.db.sql_list("""select user - from `tabPOS Setting` {0}""".format(condition)) + from `tabPOS Profile` {0}""".format(condition)) for user in pos_view_users: if user: diff --git a/erpnext/accounts/doctype/pos_setting/test_pos_setting.py b/erpnext/accounts/doctype/pos_profile/test_pos_profile.py similarity index 60% rename from erpnext/accounts/doctype/pos_setting/test_pos_setting.py rename to erpnext/accounts/doctype/pos_profile/test_pos_profile.py index 4f521f0233..62274a332f 100644 --- a/erpnext/accounts/doctype/pos_setting/test_pos_setting.py +++ b/erpnext/accounts/doctype/pos_profile/test_pos_profile.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt from __future__ import unicode_literals @@ -5,7 +6,7 @@ from __future__ import unicode_literals import frappe import unittest -test_records = frappe.get_test_records('POS Setting') +# test_records = frappe.get_test_records('POS Profile') -class TestPOSSetting(unittest.TestCase): +class TestPOSProfile(unittest.TestCase): pass diff --git a/erpnext/accounts/doctype/pos_setting/README.md b/erpnext/accounts/doctype/pos_setting/README.md deleted file mode 100644 index 2ddef7893f..0000000000 --- a/erpnext/accounts/doctype/pos_setting/README.md +++ /dev/null @@ -1 +0,0 @@ -Standard settings for Point of Sales (POS) type of Sales Invoice. \ No newline at end of file diff --git a/erpnext/accounts/doctype/pos_setting/__init__.py b/erpnext/accounts/doctype/pos_setting/__init__.py deleted file mode 100644 index baffc48825..0000000000 --- a/erpnext/accounts/doctype/pos_setting/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.json b/erpnext/accounts/doctype/pos_setting/pos_setting.json deleted file mode 100755 index b18a41156d..0000000000 --- a/erpnext/accounts/doctype/pos_setting/pos_setting.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "allow_rename": 0, - "autoname": "hash", - "creation": "2013-05-24 12:15:51", - "docstatus": 0, - "doctype": "DocType", - "fields": [ - { - "fieldname": "user", - "fieldtype": "Link", - "in_list_view": 1, - "label": "User", - "oldfieldname": "user", - "oldfieldtype": "Link", - "options": "User", - "permlevel": 0, - "read_only": 0 - }, - { - "description": "", - "fieldname": "territory", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Territory", - "oldfieldname": "territory", - "oldfieldtype": "Link", - "options": "Territory", - "permlevel": 0, - "read_only": 0, - "reqd": 1 - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "in_list_view": 1, - "label": "Series", - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "[Select]", - "permlevel": 0, - "read_only": 0, - "reqd": 1 - }, - { - "fieldname": "currency", - "fieldtype": "Link", - "in_list_view": 0, - "label": "Currency", - "oldfieldname": "currency", - "oldfieldtype": "Select", - "options": "Currency", - "permlevel": 0, - "read_only": 0, - "reqd": 1 - }, - { - "fieldname": "selling_price_list", - "fieldtype": "Link", - "label": "Price List", - "oldfieldname": "price_list_name", - "oldfieldtype": "Select", - "options": "Price List", - "permlevel": 0, - "read_only": 0, - "reqd": 0 - }, - { - "fieldname": "company", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Company", - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "permlevel": 0, - "read_only": 0, - "reqd": 1 - }, - { - "fieldname": "column_break0", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "read_only": 0 - }, - { - "default": "1", - "description": "Create Stock Ledger Entries when you submit a Sales Invoice", - "fieldname": "update_stock", - "fieldtype": "Check", - "label": "Update Stock", - "permlevel": 0, - "reqd": 0 - }, - { - "fieldname": "customer", - "fieldtype": "Link", - "in_list_view": 0, - "label": "Customer", - "oldfieldname": "customer_account", - "oldfieldtype": "Link", - "options": "Customer", - "permlevel": 0, - "read_only": 0, - "reqd": 0 - }, - { - "fieldname": "cash_bank_account", - "fieldtype": "Link", - "label": "Cash/Bank Account", - "oldfieldname": "cash_bank_account", - "oldfieldtype": "Link", - "options": "Account", - "permlevel": 0, - "read_only": 0, - "reqd": 1 - }, - { - "fieldname": "income_account", - "fieldtype": "Link", - "label": "Income Account", - "oldfieldname": "income_account", - "oldfieldtype": "Link", - "options": "Account", - "permlevel": 0, - "read_only": 0, - "reqd": 1 - }, - { - "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", - "fieldname": "expense_account", - "fieldtype": "Link", - "hidden": 0, - "label": "Expense Account", - "options": "Account", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "reqd": 0 - }, - { - "fieldname": "warehouse", - "fieldtype": "Link", - "label": "Warehouse", - "oldfieldname": "warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "permlevel": 0, - "read_only": 0, - "reqd": 0 - }, - { - "fieldname": "cost_center", - "fieldtype": "Link", - "label": "Cost Center", - "oldfieldname": "cost_center", - "oldfieldtype": "Link", - "options": "Cost Center", - "permlevel": 0, - "read_only": 0, - "reqd": 1 - }, - { - "fieldname": "taxes_and_charges", - "fieldtype": "Link", - "label": "Taxes and Charges", - "oldfieldname": "charge", - "oldfieldtype": "Link", - "options": "Sales Taxes and Charges Template", - "permlevel": 0, - "read_only": 0 - }, - { - "fieldname": "write_off_account", - "fieldtype": "Link", - "label": "Write Off Account", - "options": "Account", - "permlevel": 0, - "precision": "", - "reqd": 1 - }, - { - "fieldname": "write_off_cost_center", - "fieldtype": "Link", - "label": "Write Off Cost Center", - "options": "Cost Center", - "permlevel": 0, - "precision": "", - "reqd": 1 - }, - { - "allow_on_submit": 1, - "fieldname": "letter_head", - "fieldtype": "Link", - "label": "Letter Head", - "oldfieldname": "letter_head", - "oldfieldtype": "Select", - "options": "Letter Head", - "permlevel": 0, - "print_hide": 1, - "read_only": 0 - }, - { - "fieldname": "tc_name", - "fieldtype": "Link", - "label": "Terms and Conditions", - "oldfieldname": "tc_name", - "oldfieldtype": "Link", - "options": "Terms and Conditions", - "permlevel": 0, - "read_only": 0 - }, - { - "allow_on_submit": 1, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "in_filter": 0, - "label": "Print Heading", - "oldfieldname": "select_print_heading", - "oldfieldtype": "Select", - "options": "Print Heading", - "permlevel": 0, - "read_only": 0 - } - ], - "icon": "icon-cog", - "idx": 1, - "modified": "2015-02-05 05:11:42.344181", - "modified_by": "Administrator", - "module": "Accounts", - "name": "POS Setting", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager", - "share": 1, - "submit": 0, - "write": 1 - }, - { - "apply_user_permissions": 1, - "delete": 0, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "submit": 0 - } - ], - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "user" -} diff --git a/erpnext/accounts/doctype/pos_setting/test_records.json b/erpnext/accounts/doctype/pos_setting/test_records.json deleted file mode 100644 index fe51488c70..0000000000 --- a/erpnext/accounts/doctype/pos_setting/test_records.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 7c366c1fd2..e5af1763b1 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -160,12 +160,12 @@ class SalesInvoice(SellingController): frappe.throw(_("Time Log Batch {0} must be 'Submitted'").format(d.time_log_batch)) def set_pos_fields(self, for_validate=False): - """Set retail related fields from pos settings""" + """Set retail related fields from POS Profiles""" if cint(self.is_pos) != 1: return - from erpnext.stock.get_item_details import get_pos_settings_item_details, get_pos_settings - pos = get_pos_settings(self.company) + from erpnext.stock.get_item_details import get_pos_profiles_item_details, get_pos_profiles + pos = get_pos_profiles(self.company) if pos: if not for_validate and not self.customer: @@ -184,7 +184,7 @@ class SalesInvoice(SellingController): # set pos values in items for item in self.get("items"): if item.get('item_code'): - for fname, val in get_pos_settings_item_details(pos, + for fname, val in get_pos_profiles_item_details(pos, frappe._dict(item.as_dict()), pos).items(): if (not for_validate) or (for_validate and not item.get(fname)): @@ -371,24 +371,24 @@ class SalesInvoice(SellingController): def get_warehouse(self): - user_pos_setting = frappe.db.sql("""select name, warehouse from `tabPOS Setting` + user_pos_profile = frappe.db.sql("""select name, warehouse from `tabPOS Profile` where ifnull(user,'') = %s and company = %s""", (frappe.session['user'], self.company)) - warehouse = user_pos_setting[0][1] if user_pos_setting else None + warehouse = user_pos_profile[0][1] if user_pos_profile else None if not warehouse: - global_pos_setting = frappe.db.sql("""select name, warehouse from `tabPOS Setting` + global_pos_profile = frappe.db.sql("""select name, warehouse from `tabPOS Profile` where ifnull(user,'') = '' and company = %s""", self.company) - if global_pos_setting: - warehouse = global_pos_setting[0][1] - elif not user_pos_setting: - msgprint(_("POS Setting required to make POS Entry"), raise_exception=True) + if global_pos_profile: + warehouse = global_pos_profile[0][1] + elif not user_pos_profile: + msgprint(_("POS Profile required to make POS Entry"), raise_exception=True) return warehouse def on_update(self): if cint(self.update_stock) == 1: - # Set default warehouse from pos setting + # Set default warehouse from POS Profile if cint(self.is_pos) == 1: w = self.get_warehouse() if w: diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 9db2b3682b..63977b782b 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -462,7 +462,7 @@ class TestSalesInvoice(unittest.TestCase): def test_pos_gl_entry_with_aii(self): set_perpetual_inventory() - self.make_pos_setting() + self.make_pos_profile() self._insert_purchase_receipt() @@ -517,19 +517,19 @@ class TestSalesInvoice(unittest.TestCase): set_perpetual_inventory(0) - frappe.db.sql("delete from `tabPOS Setting`") + frappe.db.sql("delete from `tabPOS Profile`") - def make_pos_setting(self): - pos_setting = frappe.get_doc({ + def make_pos_profile(self): + pos_profile = frappe.get_doc({ "cash_bank_account": "_Test Account Bank Account - _TC", "company": "_Test Company", "cost_center": "_Test Cost Center - _TC", "currency": "INR", - "doctype": "POS Setting", + "doctype": "POS Profile", "expense_account": "_Test Account Cost for Goods Sold - _TC", "income_account": "Sales - _TC", - "name": "_Test POS Setting", - "naming_series": "_T-POS Setting-", + "name": "_Test POS Profile", + "naming_series": "_T-POS Profile-", "selling_price_list": "_Test Price List", "territory": "_Test Territory", "warehouse": "_Test Warehouse - _TC", @@ -537,8 +537,8 @@ class TestSalesInvoice(unittest.TestCase): "write_off_cost_center": "_Test Write Off Cost Center - _TC" }) - if not frappe.db.exists("POS Setting", "_Test POS Setting"): - pos_setting.insert() + if not frappe.db.exists("POS Profile", "_Test POS Profile"): + pos_profile.insert() def test_si_gl_entry_with_aii_and_update_stock_with_warehouse_but_no_account(self): set_perpetual_inventory() diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index 1bc5681231..df7757b842 100644 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -35,7 +35,7 @@ frappe.pages['pos'].on_page_load = function(wrapper) { }); $.ajax({ - url: "/api/resource/POS Setting", + url: "/api/resource/POS Profile", success: function(data) { if(!data.data.length) { page.main.find(".pos-setting-message").removeClass('hide'); diff --git a/erpnext/change_log/current/rename_pos_setting.md b/erpnext/change_log/current/rename_pos_setting.md new file mode 100644 index 0000000000..2705a175d1 --- /dev/null +++ b/erpnext/change_log/current/rename_pos_setting.md @@ -0,0 +1 @@ +- POS Setting is renamed to POS Profile diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py index 6b02c1b64e..1b29002257 100644 --- a/erpnext/config/accounts.py +++ b/erpnext/config/accounts.py @@ -113,7 +113,7 @@ def get_data(): }, { "type": "doctype", - "name": "POS Setting", + "name": "POS Profile", "label": _("Point-of-Sale Setting"), "description": _("Rules to calculate shipping amount for a sale") }, diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 185a91560b..2990ab0f1a 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -155,3 +155,4 @@ erpnext.patches.v5_0.reclculate_planned_operating_cost_in_production_order erpnext.patches.v5_0.repost_requested_qty erpnext.patches.v5_0.fix_taxes_and_totals_in_party_currency erpnext.patches.v5_0.update_tax_amount_after_discount_in_purchase_cycle +erpnext.patches.v5_0.rename_pos_setting diff --git a/erpnext/patches/v5_0/rename_pos_setting.py b/erpnext/patches/v5_0/rename_pos_setting.py new file mode 100644 index 0000000000..ad579b61ff --- /dev/null +++ b/erpnext/patches/v5_0/rename_pos_setting.py @@ -0,0 +1,5 @@ +import frappe + +def execute(): + if frappe.db.table_exists("POS Setting"): + frappe.rename_doc("DocType", "POS Setting", "POS Profile") diff --git a/erpnext/public/js/feature_setup.js b/erpnext/public/js/feature_setup.js index 85f8e054c1..5ab04ddfa2 100644 --- a/erpnext/public/js/feature_setup.js +++ b/erpnext/public/js/feature_setup.js @@ -117,7 +117,7 @@ erpnext.feature_setup.feature_dict = { 'base_total', 'base_net_total', 'base_discount_amount', 'base_total_taxes_and_charges'], 'items': ['base_price_list_rate','base_amount','base_rate', 'base_net_rate', 'base_net_amount'] }, - 'POS Setting': {'fields':['conversion_rate','currency']}, + 'POS Profile': {'fields':['conversion_rate','currency']}, 'Quotation': { 'fields': ['conversion_rate','currency','base_grand_total','base_in_words','base_rounded_total', 'base_total', 'base_net_total', 'base_discount_amount', 'base_total_taxes_and_charges'], diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 3c820fa583..3f73932c5f 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -51,7 +51,7 @@ def get_item_details(args): get_price_list_rate(args, item_doc, out) if args.transaction_type == "selling" and cint(args.is_pos): - out.update(get_pos_settings_item_details(args.company, args)) + out.update(get_pos_profiles_item_details(args.company, args)) # update args with out, if key or value not exists for key, value in out.iteritems(): @@ -267,16 +267,16 @@ def get_party_item_code(args, item_doc, out): item_supplier = item_doc.get("supplier_items", {"supplier": args.supplier}) out.supplier_part_no = item_supplier[0].supplier_part_no if item_supplier else None -def get_pos_settings_item_details(company, args, pos_settings=None): +def get_pos_profiles_item_details(company, args, pos_profiles=None): res = frappe._dict() - if not pos_settings: - pos_settings = get_pos_settings(company) + if not pos_profiles: + pos_profiles = get_pos_profiles(company) - if pos_settings: + if pos_profiles: for fieldname in ("income_account", "cost_center", "warehouse", "expense_account"): - if not args.get(fieldname) and pos_settings.get(fieldname): - res[fieldname] = pos_settings.get(fieldname) + if not args.get(fieldname) and pos_profiles.get(fieldname): + res[fieldname] = pos_profiles.get(fieldname) if res.get("warehouse"): res.actual_qty = get_available_qty(args.item_code, @@ -284,15 +284,15 @@ def get_pos_settings_item_details(company, args, pos_settings=None): return res -def get_pos_settings(company): - pos_settings = frappe.db.sql("""select * from `tabPOS Setting` where user = %s +def get_pos_profiles(company): + pos_profiles = frappe.db.sql("""select * from `tabPOS Profile` where user = %s and company = %s""", (frappe.session['user'], company), as_dict=1) - if not pos_settings: - pos_settings = frappe.db.sql("""select * from `tabPOS Setting` + if not pos_profiles: + pos_profiles = frappe.db.sql("""select * from `tabPOS Profile` where ifnull(user,'') = '' and company = %s""", company, as_dict=1) - return pos_settings and pos_settings[0] or None + return pos_profiles and pos_profiles[0] or None def get_serial_nos_by_fifo(args, item_doc): From 43c885868fe55b53ab686636a74da21134ee30fc Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 20 May 2015 16:47:45 +0530 Subject: [PATCH 02/15] [usability] re-layout Issue Form --- erpnext/support/doctype/issue/issue.json | 119 +++++++++++++---------- 1 file changed, 67 insertions(+), 52 deletions(-) diff --git a/erpnext/support/doctype/issue/issue.json b/erpnext/support/doctype/issue/issue.json index 8ba1b5a33c..9a698c541b 100644 --- a/erpnext/support/doctype/issue/issue.json +++ b/erpnext/support/doctype/issue/issue.json @@ -69,7 +69,18 @@ "reqd": 1 }, { - "depends_on": "eval:doc.__islocal", + "fieldname": "fold", + "fieldtype": "Fold", + "permlevel": 0 + }, + { + "fieldname": "section_break_7", + "fieldtype": "Section Break", + "permlevel": 0, + "precision": "" + }, + { + "depends_on": "", "fieldname": "description", "fieldtype": "Text", "label": "Description", @@ -79,27 +90,38 @@ "reqd": 0 }, { - "fieldname": "fold", - "fieldtype": "Fold", + "fieldname": "column_break_9", + "fieldtype": "Column Break", + "permlevel": 0, + "precision": "" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "resolution_date", + "fieldtype": "Datetime", + "in_filter": 0, + "label": "Resolution Date", + "no_copy": 1, + "oldfieldname": "resolution_date", + "oldfieldtype": "Date", + "permlevel": 0, + "read_only": 1, + "search_index": 0 + }, + { + "fieldname": "first_responded_on", + "fieldtype": "Datetime", + "label": "First Responded On", "permlevel": 0 }, { "fieldname": "additional_info", "fieldtype": "Section Break", - "label": "Reference", + "label": "", "options": "icon-pushpin", "permlevel": 0, "read_only": 1 }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "column_break0", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "read_only": 1, - "width": "50%" - }, { "fieldname": "lead", "fieldtype": "Link", @@ -114,6 +136,12 @@ "options": "Contact", "permlevel": 0 }, + { + "fieldname": "column_break_16", + "fieldtype": "Column Break", + "permlevel": 0, + "precision": "" + }, { "fieldname": "customer", "fieldtype": "Link", @@ -140,6 +168,31 @@ "reqd": 0, "search_index": 0 }, + { + "fieldname": "section_break_19", + "fieldtype": "Section Break", + "permlevel": 0, + "precision": "" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "resolution_details", + "fieldtype": "Small Text", + "label": "Resolution Details", + "no_copy": 1, + "oldfieldname": "resolution_details", + "oldfieldtype": "Text", + "permlevel": 0, + "read_only": 0 + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "read_only": 1 + }, { "default": "Today", "fieldname": "opening_date", @@ -170,44 +223,6 @@ "print_hide": 1, "reqd": 0 }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "read_only": 1 - }, - { - "fieldname": "first_responded_on", - "fieldtype": "Datetime", - "label": "First Responded On", - "permlevel": 0 - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "resolution_date", - "fieldtype": "Datetime", - "in_filter": 0, - "label": "Resolution Date", - "no_copy": 1, - "oldfieldname": "resolution_date", - "oldfieldtype": "Date", - "permlevel": 0, - "read_only": 1, - "search_index": 0 - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "resolution_details", - "fieldtype": "Small Text", - "label": "Resolution Details", - "no_copy": 1, - "oldfieldname": "resolution_details", - "oldfieldtype": "Text", - "permlevel": 0, - "read_only": 0 - }, { "fieldname": "content_type", "fieldtype": "Data", @@ -218,7 +233,7 @@ ], "icon": "icon-ticket", "idx": 1, - "modified": "2015-04-02 22:06:02.684820", + "modified": "2015-05-20 07:16:53.673114", "modified_by": "Administrator", "module": "Support", "name": "Issue", From 555fa4fbc2d06f14e4bf23a1ae82dd9286e80dc3 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 20 May 2015 17:21:53 +0530 Subject: [PATCH 03/15] [fix] totals etc should not be clickable --- erpnext/accounts/report/balance_sheet/balance_sheet.py | 2 +- .../bank_reconciliation_statement.py | 6 +++--- erpnext/accounts/report/financial_statements.py | 4 ++-- erpnext/accounts/report/general_ledger/general_ledger.py | 6 +++--- .../profit_and_loss_statement/profit_and_loss_statement.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index 168f9b1093..f664a9edfa 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -29,7 +29,7 @@ def execute(filters=None): def get_provisional_profit_loss(asset, liability, equity, period_list): if asset and (liability or equity): provisional_profit_loss = { - "account_name": _("Provisional Profit / Loss (Credit)"), + "account_name": _("'Provisional Profit / Loss (Credit)'"), "account": None, "warn_if_negative": True } diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py index 8f4b2cab7b..e592f69700 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -38,7 +38,7 @@ def execute(filters=None): data += [ get_balance_row(_("System Balance"), balance_as_per_system), [""]*len(columns), - ["", _("Amounts not reflected in bank"), total_debit, total_credit, "", "", "", ""], + ["", '"' + _("Amounts not reflected in bank") + '"', total_debit, total_credit, "", "", "", ""], get_balance_row(_("Amounts not reflected in system"), amounts_not_reflected_in_system), [""]*len(columns), get_balance_row(_("Expected balance as per bank"), bank_bal) @@ -68,6 +68,6 @@ def get_entries(filters): def get_balance_row(label, amount): if amount > 0: - return ["", label, amount, 0, "", "", "", ""] + return ["", '"' + label + '"', amount, 0, "", "", "", ""] else: - return ["", label, 0, abs(amount), "", "", "", ""] + return ["", '"' + label + '"', 0, abs(amount), "", "", "", ""] diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 88d1bebb8d..e769373bdc 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -146,7 +146,7 @@ def prepare_data(accounts, balance_must_be, period_list): def add_total_row(out, balance_must_be, period_list): row = { - "account_name": _("Total ({0})").format(balance_must_be), + "account_name": _("'Total ({0})'").format(balance_must_be), "account": None } for period in period_list: @@ -207,7 +207,7 @@ def filter_accounts(accounts, depth=10): add_to_list(None, 0) return filtered_accounts, accounts_by_name - + def sort_root_accounts(roots): """Sort root types as Asset, Liability, Equity, Income, Expense""" diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 2731baa27e..de476f7828 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -120,14 +120,14 @@ def get_data_with_opening_closing(filters, account_details, gl_entries): # Totals and closing for individual ledger, if grouped by account if filters.get("group_by_account"): - data += [{"account": "Totals", "debit": acc_dict.total_debit, + data += [{"account": "'Totals'", "debit": acc_dict.total_debit, "credit": acc_dict.total_credit}, get_balance_row("Closing (Opening + Totals)", (acc_dict.opening + acc_dict.total_debit - acc_dict.total_credit)), {}] # Total debit and credit between from and to date if total_debit or total_credit: - data.append({"account": "Totals", "debit": total_debit, "credit": total_credit}) + data.append({"account": "'Totals'", "debit": total_debit, "credit": total_credit}) # Closing for filtered account if filters.get("account"): @@ -168,7 +168,7 @@ def get_accountwise_gle(filters, gl_entries, gle_map): def get_balance_row(label, balance): return { - "account": label, + "account": "'" + label + "'", "debit": balance if balance > 0 else 0, "credit": -1*balance if balance < 0 else 0, } diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 1d1337662a..6e7b13ec32 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -27,7 +27,7 @@ def execute(filters=None): def get_net_profit_loss(income, expense, period_list): if income and expense: net_profit_loss = { - "account_name": _("Net Profit / Loss"), + "account_name": _("'Net Profit / Loss'"), "account": None, "warn_if_negative": True } From a60984866cef0c4f4b3ebb84bdb2197fe20365d3 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 20 May 2015 17:45:18 +0530 Subject: [PATCH 04/15] [enhancement] letter head in stock entry #3291 --- .../stock/doctype/stock_entry/stock_entry.js | 21 +++++++++++++++---- .../doctype/stock_entry/stock_entry.json | 10 ++++++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index e954cf628b..4670ff81e0 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -43,7 +43,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ return erpnext.queries.item({is_stock_item: "Yes"}); } }; - + this.frm.set_query("purchase_order", function() { return { "filters": { @@ -68,8 +68,13 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ }, onload_post_render: function() { + var me = this; cur_frm.get_field("items").grid.set_multiple_add("item_code", "qty"); - this.set_default_account(); + this.set_default_account(function() { + if(me.frm.doc.__islocal && me.frm.doc.company && !me.frm.doc.amended_from) { + cur_frm.script_manager.trigger("company"); + } + }); }, refresh: function() { @@ -102,7 +107,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ this.clean_up(); }, - set_default_account: function() { + set_default_account: function(callback) { var me = this; if(cint(frappe.defaults.get_default("auto_accounting_for_stock")) && this.frm.doc.company) { @@ -122,6 +127,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ $.each(me.frm.doc.items || [], function(i, d) { if(!d.expense_account) d.expense_account = r.message; }); + if(callback) callback(); } } }); @@ -521,7 +527,14 @@ cur_frm.fields_dict.supplier.get_query = function(doc, cdt, cdn) { } cur_frm.cscript.company = function(doc, cdt, cdn) { - erpnext.get_fiscal_year(doc.company, doc.posting_date); + if(doc.company) { + erpnext.get_fiscal_year(doc.company, doc.posting_date, function() { + var company_doc = frappe.get_doc(":Company", doc.company); + if(company_doc.default_letter_head) { + cur_frm.set_value("letter_head", company_doc.default_letter_head); + } + }); + } } cur_frm.cscript.posting_date = function(doc, cdt, cdn){ diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json index 126da733aa..11898cee1e 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.json +++ b/erpnext/stock/doctype/stock_entry/stock_entry.json @@ -632,6 +632,14 @@ "reqd": 0, "search_index": 0 }, + { + "fieldname": "letter_head", + "fieldtype": "Link", + "label": "Letter Head", + "options": "Letter Head", + "permlevel": 0, + "precision": "" + }, { "allow_on_submit": 0, "fieldname": "amended_from", @@ -670,7 +678,7 @@ "is_submittable": 1, "issingle": 0, "max_attachments": 0, - "modified": "2015-03-03 18:09:12.035606", + "modified": "2015-05-20 07:58:59.025553", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry", From c55edf18ad9ef3b6e33023cceb80d9a0855eeb1f Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Tue, 12 May 2015 12:18:31 +0530 Subject: [PATCH 05/15] fixes in quotation - from opportunity --- erpnext/selling/doctype/quotation/quotation.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index 1725de719e..b02bff7874 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -34,8 +34,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ method: "erpnext.crm.doctype.opportunity.opportunity.make_quotation", source_doctype: "Opportunity", get_query_filters: { - docstatus: 1, - status: "Submitted", + status: ["!=", "Lost"], enquiry_type: cur_frm.doc.order_type, customer: cur_frm.doc.customer || undefined, lead: cur_frm.doc.lead || undefined, From 68a6d615895d3aa2e0e28818fe605ecbe3cd925b Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Wed, 20 May 2015 19:01:37 +0530 Subject: [PATCH 06/15] filter added for closed oppurtunity --- erpnext/selling/doctype/quotation/quotation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index b02bff7874..d717e20675 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -34,7 +34,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ method: "erpnext.crm.doctype.opportunity.opportunity.make_quotation", source_doctype: "Opportunity", get_query_filters: { - status: ["!=", "Lost"], + status: ["not in", ["Lost", "Closed"]], enquiry_type: cur_frm.doc.order_type, customer: cur_frm.doc.customer || undefined, lead: cur_frm.doc.lead || undefined, From 4258753ae8034a583940a3f09e4322f01d9be4eb Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 21 May 2015 12:22:33 +0530 Subject: [PATCH 07/15] validation added to item varients --- erpnext/stock/doctype/item/item.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index de605021bd..e5f70c4317 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -161,6 +161,10 @@ class Item(WebsiteGenerator): frappe.throw(_("{0} {1} is entered more than once in Item Variants table") .format(d.item_attribute, d.item_attribute_value), DuplicateVariant) variants.append(key) + + if not d.item_attribute_value in [t.attribute_value for t in frappe.db.get_all("Item Attribute Value", + fields=["attribute_value"], filters={"parent": d.item_attribute })]: + frappe.throw(_("Attribute value {0} does not exist in Item Attribute Master.").format(d.item_attribute_value)) else: frappe.throw(_("Please enter atleast one attribute row in Item Variants table")) From 4984bccbc65e18b0d6bdc8e353f61c033ab9f851 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 21 May 2015 12:51:07 +0530 Subject: [PATCH 08/15] [fix] load taxes_and_charges only if field present --- erpnext/public/js/controllers/transaction.js | 26 +++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index a3f1ecae9c..7e5dc32139 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -66,18 +66,22 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ apply_default_taxes: function() { var me = this; - return frappe.call({ - method: "erpnext.controllers.accounts_controller.get_default_taxes_and_charges", - args: { - "master_doctype": frappe.meta.get_docfield(me.frm.doc.doctype, "taxes_and_charges", - me.frm.doc.name).options - }, - callback: function(r) { - if(!r.exc) { - me.frm.set_value("taxes", r.message); + var taxes_and_charges_field = frappe.meta.get_docfield(me.frm.doc.doctype, "taxes_and_charges", + me.frm.doc.name); + + if(taxes_and_charges_field) { + frappe.call({ + method: "erpnext.controllers.accounts_controller.get_default_taxes_and_charges", + args: { + "master_doctype": taxes_and_charges_field.options + }, + callback: function(r) { + if(!r.exc) { + me.frm.set_value("taxes", r.message); + } } - } - }); + }); + } }, setup_sms: function() { From de7b87ee3a11e7b825fd9772457e677d52774f7e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 21 May 2015 12:45:30 +0530 Subject: [PATCH 09/15] [fix] operations and bom --- erpnext/manufacturing/doctype/bom/bom.js | 1 - .../production_order/production_order.js | 26 ++++++++++--------- .../production_order_operation.json | 4 +-- erpnext/patches.txt | 1 + .../stock/doctype/stock_entry/stock_entry.js | 4 +-- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 699b272f23..c6e5bf0a3e 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -35,7 +35,6 @@ cur_frm.cscript.hour_rate = function(doc, dt, dn) { } cur_frm.cscript.time_in_mins = cur_frm.cscript.hour_rate; -cur_frm.cscript.fixed_cycle_cost = cur_frm.cscript.hour_rate; cur_frm.cscript.item_code = function(doc, cdt, cdn) { get_bom_material_detail(doc, cdt, cdn); diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js index 3781450d36..17fbc5e235 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.js +++ b/erpnext/manufacturing/doctype/production_order/production_order.js @@ -35,18 +35,20 @@ frappe.ui.form.on("Production Order", "additional_operating_cost", function(frm) frappe.ui.form.on("Production Order Operation", "workstation", function(frm, cdt, cdn) { var d = locals[cdt][cdn]; - frappe.call({ - "method": "frappe.client.get", - args: { - doctype: "Workstation", - name: d.workstation - }, - callback: function (data) { - frappe.model.set_value(d.doctype, d.name, "hour_rate", data.message.hour_rate); - erpnext.production_order.calculate_cost(frm.doc); - erpnext.production_order.calculate_total_cost(frm); - } - }) + if (d.workstation) { + frappe.call({ + "method": "frappe.client.get", + args: { + doctype: "Workstation", + name: d.workstation + }, + callback: function (data) { + frappe.model.set_value(d.doctype, d.name, "hour_rate", data.message.hour_rate); + erpnext.production_order.calculate_cost(frm.doc); + erpnext.production_order.calculate_total_cost(frm); + } + }) + } }); frappe.ui.form.on("Production Order Operation", "time_in_mins", function(frm, cdt, cdn) { diff --git a/erpnext/manufacturing/doctype/production_order_operation/production_order_operation.json b/erpnext/manufacturing/doctype/production_order_operation/production_order_operation.json index 83134853e2..c57d848a4b 100644 --- a/erpnext/manufacturing/doctype/production_order_operation/production_order_operation.json +++ b/erpnext/manufacturing/doctype/production_order_operation/production_order_operation.json @@ -33,7 +33,7 @@ "print_hide": 0, "read_only": 1, "report_hide": 0, - "reqd": 1, + "reqd": 0, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -293,7 +293,7 @@ "is_submittable": 0, "issingle": 0, "istable": 1, - "modified": "2015-04-22 03:25:18.542350", + "modified": "2015-05-21 13:46:27.730392", "modified_by": "Administrator", "module": "Manufacturing", "name": "Production Order Operation", diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 2990ab0f1a..85adbee88f 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -156,3 +156,4 @@ erpnext.patches.v5_0.repost_requested_qty erpnext.patches.v5_0.fix_taxes_and_totals_in_party_currency erpnext.patches.v5_0.update_tax_amount_after_discount_in_purchase_cycle erpnext.patches.v5_0.rename_pos_setting +execute:frappe.db.sql("update `tabBOM Operation` set description=opn_description where ifnull(description, '') = ''") diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 4670ff81e0..c7810fd039 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -446,9 +446,9 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) { callback: function(r) { if(r.message) { $.each(r.message, function(k, v) { - frappe.model.set_value(cdt, cdn, k, v); + d[k] = v; }); - refresh_field('image_view', d.name, 'items'); + refresh_field('items'); } } }); From 4c924bb76cce6cc01038b0a9eafcaf5e7b194548 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 21 May 2015 13:38:03 +0530 Subject: [PATCH 10/15] totals etc should not be clickable --- .../accounts/report/balance_sheet/balance_sheet.py | 2 +- erpnext/accounts/report/financial_statements.py | 2 +- .../accounts/report/general_ledger/general_ledger.py | 12 ++++++------ .../profit_and_loss_statement.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index f664a9edfa..65d429c68f 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -29,7 +29,7 @@ def execute(filters=None): def get_provisional_profit_loss(asset, liability, equity, period_list): if asset and (liability or equity): provisional_profit_loss = { - "account_name": _("'Provisional Profit / Loss (Credit)'"), + "account_name": "'" + _("Provisional Profit / Loss (Credit)") + "'", "account": None, "warn_if_negative": True } diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index e769373bdc..c7637789c0 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -146,7 +146,7 @@ def prepare_data(accounts, balance_must_be, period_list): def add_total_row(out, balance_must_be, period_list): row = { - "account_name": _("'Total ({0})'").format(balance_must_be), + "account_name": "'" + _("Total ({0})").format(balance_must_be) + "'", "account": None } for period in period_list: diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index de476f7828..8e34cdbdba 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -108,30 +108,30 @@ def get_data_with_opening_closing(filters, account_details, gl_entries): # Opening for filtered account if filters.get("account"): - data += [get_balance_row("Opening", opening), {}] + data += [get_balance_row(_("Opening"), opening), {}] for acc, acc_dict in gle_map.items(): if acc_dict.entries: # Opening for individual ledger, if grouped by account if filters.get("group_by_account"): - data.append(get_balance_row("Opening", acc_dict.opening)) + data.append(get_balance_row(_("Opening"), acc_dict.opening)) data += acc_dict.entries # Totals and closing for individual ledger, if grouped by account if filters.get("group_by_account"): - data += [{"account": "'Totals'", "debit": acc_dict.total_debit, + data += [{"account": "'" + _("Totals") + "'", "debit": acc_dict.total_debit, "credit": acc_dict.total_credit}, - get_balance_row("Closing (Opening + Totals)", + get_balance_row(_("Closing (Opening + Totals)"), (acc_dict.opening + acc_dict.total_debit - acc_dict.total_credit)), {}] # Total debit and credit between from and to date if total_debit or total_credit: - data.append({"account": "'Totals'", "debit": total_debit, "credit": total_credit}) + data.append({"account": "'" + _("Totals") + "'", "debit": total_debit, "credit": total_credit}) # Closing for filtered account if filters.get("account"): - data.append(get_balance_row("Closing (Opening + Totals)", + data.append(get_balance_row(_("Closing (Opening + Totals)"), (opening + total_debit - total_credit))) return data diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 6e7b13ec32..0431eb6e92 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -27,7 +27,7 @@ def execute(filters=None): def get_net_profit_loss(income, expense, period_list): if income and expense: net_profit_loss = { - "account_name": _("'Net Profit / Loss'"), + "account_name": "'" + _("Net Profit / Loss") + "'", "account": None, "warn_if_negative": True } From e372fb11ea70ed313bf8a41b1e22710e0105f75b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 21 May 2015 14:27:20 +0530 Subject: [PATCH 11/15] naming series fix --- erpnext/setup/doctype/naming_series/naming_series.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py index bb589b2a66..1b986827c2 100644 --- a/erpnext/setup/doctype/naming_series/naming_series.py +++ b/erpnext/setup/doctype/naming_series/naming_series.py @@ -21,6 +21,7 @@ class NamingSeries(Document): prefixes = "" for d in doctypes: + options = "" try: options = self.get_options(d) except frappe.DoesNotExistError: From 753e40b4d5aac011f7a61b6f37da491490880c2d Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 21 May 2015 14:38:39 +0530 Subject: [PATCH 12/15] fixes in validation for item varients --- erpnext/stock/doctype/item/item.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index e5f70c4317..aa463eee77 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -154,16 +154,18 @@ class Item(WebsiteGenerator): if self.variant_of: frappe.throw(_("Item cannot be a variant of a variant")) - variants = [] + variants, attributes = [], {} for d in self.variants: key = (d.item_attribute, d.item_attribute_value) if key in variants: frappe.throw(_("{0} {1} is entered more than once in Item Variants table") .format(d.item_attribute, d.item_attribute_value), DuplicateVariant) variants.append(key) + + attributes.setdefault(d.item_attribute, [t.attribute_value for t in frappe.db.get_all("Item Attribute Value", + fields=["attribute_value"], filters={"parent": d.item_attribute })]) - if not d.item_attribute_value in [t.attribute_value for t in frappe.db.get_all("Item Attribute Value", - fields=["attribute_value"], filters={"parent": d.item_attribute })]: + if d.item_attribute_value not in attributes.get(d.item_attribute): frappe.throw(_("Attribute value {0} does not exist in Item Attribute Master.").format(d.item_attribute_value)) else: frappe.throw(_("Please enter atleast one attribute row in Item Variants table")) From 9895aba42e9522431cb3703dbdad2f2a3008a257 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 21 May 2015 14:43:24 +0530 Subject: [PATCH 13/15] update operation description patch --- erpnext/patches.txt | 2 +- erpnext/patches/v5_0/update_operation_description.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 erpnext/patches/v5_0/update_operation_description.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 85adbee88f..65a6de4348 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -156,4 +156,4 @@ erpnext.patches.v5_0.repost_requested_qty erpnext.patches.v5_0.fix_taxes_and_totals_in_party_currency erpnext.patches.v5_0.update_tax_amount_after_discount_in_purchase_cycle erpnext.patches.v5_0.rename_pos_setting -execute:frappe.db.sql("update `tabBOM Operation` set description=opn_description where ifnull(description, '') = ''") +erpnext.patches.v5_0.update_operation_description \ No newline at end of file diff --git a/erpnext/patches/v5_0/update_operation_description.py b/erpnext/patches/v5_0/update_operation_description.py new file mode 100644 index 0000000000..ae7b6326cb --- /dev/null +++ b/erpnext/patches/v5_0/update_operation_description.py @@ -0,0 +1,10 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +import frappe +import frappe.permissions + +def execute(): + if "opn_description" in frappe.db.get_table_columns("BOM Operation"): + frappe.db.sql("""update `tabBOM Operation` set description = opn_description + where ifnull(description, '') = ''""") \ No newline at end of file From 3bc3384bc4ed9cc6a609a09fdc9bf8e051d1e67b Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 21 May 2015 15:06:38 +0530 Subject: [PATCH 14/15] [minor] remove section headings --- .../purchase_invoice/purchase_invoice.json | 6 +- .../doctype/sales_invoice/sales_invoice.json | 2100 ++++++++--------- 2 files changed, 1053 insertions(+), 1053 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 947e1a13d5..9b373e8e6d 100755 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -611,7 +611,7 @@ { "fieldname": "advances_section", "fieldtype": "Section Break", - "label": "Advances", + "label": "", "oldfieldtype": "Section Break", "options": "icon-money", "permlevel": 0, @@ -665,7 +665,7 @@ "depends_on": "supplier", "fieldname": "contact_section", "fieldtype": "Section Break", - "label": "Contact Info", + "label": "", "options": "icon-bullhorn", "permlevel": 0, "read_only": 0 @@ -939,7 +939,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2015-05-15 14:20:47.718194", + "modified": "2015-05-21 05:34:42.436924", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 258edebe9b..0fcc6fba5d 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -1,1306 +1,1306 @@ { - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2013-05-24 19:29:05", - "default_print_format": "Standard", - "docstatus": 0, - "doctype": "DocType", - "document_type": "Transaction", + "allow_import": 1, + "autoname": "naming_series:", + "creation": "2013-05-24 19:29:05", + "default_print_format": "Standard", + "docstatus": 0, + "doctype": "DocType", + "document_type": "Transaction", "fields": [ { - "fieldname": "customer_section", - "fieldtype": "Section Break", - "label": "", - "options": "icon-user", + "fieldname": "customer_section", + "fieldtype": "Section Break", + "label": "", + "options": "icon-user", "permlevel": 0 - }, + }, { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "SINV-", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "SINV-", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "reqd": 1 - }, + }, { - "fieldname": "customer", - "fieldtype": "Link", - "hidden": 0, - "label": "Customer", - "no_copy": 0, - "oldfieldname": "customer", - "oldfieldtype": "Link", - "options": "Customer", - "permlevel": 0, - "print_hide": 1, + "fieldname": "customer", + "fieldtype": "Link", + "hidden": 0, + "label": "Customer", + "no_copy": 0, + "oldfieldname": "customer", + "oldfieldtype": "Link", + "options": "Customer", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "depends_on": "customer", - "fieldname": "customer_name", - "fieldtype": "Data", - "hidden": 0, - "in_list_view": 0, - "label": "Name", - "oldfieldname": "customer_name", - "oldfieldtype": "Data", - "permlevel": 0, + "depends_on": "customer", + "fieldname": "customer_name", + "fieldtype": "Data", + "hidden": 0, + "in_list_view": 0, + "label": "Name", + "oldfieldname": "customer_name", + "oldfieldtype": "Data", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "address_display", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Address", - "permlevel": 0, + "fieldname": "address_display", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Address", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "contact_display", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Contact", - "permlevel": 0, + "fieldname": "contact_display", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Contact", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "contact_mobile", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Mobile No", - "permlevel": 0, + "fieldname": "contact_mobile", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Mobile No", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "contact_email", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Contact Email", - "permlevel": 0, - "print_hide": 1, + "fieldname": "contact_email", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Contact Email", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "mode_of_payment", - "fieldtype": "Link", - "label": "Mode of Payment", - "no_copy": 0, - "oldfieldname": "mode_of_payment", - "oldfieldtype": "Select", - "options": "Mode of Payment", - "permlevel": 0, + "fieldname": "mode_of_payment", + "fieldtype": "Link", + "label": "Mode of Payment", + "no_copy": 0, + "oldfieldname": "mode_of_payment", + "oldfieldtype": "Select", + "options": "Mode of Payment", + "permlevel": 0, "read_only": 0 - }, + }, { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, "read_only": 0 - }, + }, { - "fieldname": "company", - "fieldtype": "Link", - "in_filter": 1, - "label": "Company", - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "reqd": 1, + "fieldname": "company", + "fieldtype": "Link", + "in_filter": 1, + "label": "Company", + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "reqd": 1, "search_index": 0 - }, + }, { - "fieldname": "amended_from", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Amended From", - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Link", - "options": "Sales Invoice", - "permlevel": 0, - "print_hide": 1, + "fieldname": "amended_from", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Amended From", + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Link", + "options": "Sales Invoice", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "default": "Today", - "fieldname": "posting_date", - "fieldtype": "Date", - "in_filter": 1, - "label": "Date", - "no_copy": 1, - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "reqd": 1, + "default": "Today", + "fieldname": "posting_date", + "fieldtype": "Date", + "in_filter": 1, + "label": "Date", + "no_copy": 1, + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "reqd": 1, "search_index": 1 - }, + }, { - "fieldname": "due_date", - "fieldtype": "Date", - "in_filter": 1, - "label": "Payment Due Date", - "no_copy": 1, - "oldfieldname": "due_date", - "oldfieldtype": "Date", - "permlevel": 0, - "read_only": 0, - "reqd": 1, + "fieldname": "due_date", + "fieldtype": "Date", + "in_filter": 1, + "label": "Payment Due Date", + "no_copy": 1, + "oldfieldname": "due_date", + "oldfieldtype": "Date", + "permlevel": 0, + "read_only": 0, + "reqd": 1, "search_index": 0 - }, + }, { - "fieldname": "is_pos", - "fieldtype": "Check", - "label": "Is POS", - "oldfieldname": "is_pos", - "oldfieldtype": "Check", - "permlevel": 0, - "print_hide": 1, + "fieldname": "is_pos", + "fieldtype": "Check", + "label": "Is POS", + "oldfieldname": "is_pos", + "oldfieldtype": "Check", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "shipping_address_name", - "fieldtype": "Link", - "hidden": 1, - "in_filter": 1, - "label": "Shipping Address Name", - "options": "Address", - "permlevel": 0, - "precision": "", + "fieldname": "shipping_address_name", + "fieldtype": "Link", + "hidden": 1, + "in_filter": 1, + "label": "Shipping Address Name", + "options": "Address", + "permlevel": 0, + "precision": "", "print_hide": 1 - }, + }, { - "fieldname": "shipping_address", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Shipping Address", - "permlevel": 0, - "precision": "", - "print_hide": 1, + "fieldname": "shipping_address", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Shipping Address", + "permlevel": 0, + "precision": "", + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "currency_and_price_list", - "fieldtype": "Section Break", - "label": "", - "options": "icon-tag", - "permlevel": 0, + "fieldname": "currency_and_price_list", + "fieldtype": "Section Break", + "label": "", + "options": "icon-tag", + "permlevel": 0, "read_only": 0 - }, + }, { - "fieldname": "currency", - "fieldtype": "Link", - "label": "Currency", - "oldfieldname": "currency", - "oldfieldtype": "Select", - "options": "Currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "currency", + "fieldtype": "Link", + "label": "Currency", + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "reqd": 1 - }, + }, { - "description": "Rate at which Customer Currency is converted to customer's base currency", - "fieldname": "conversion_rate", - "fieldtype": "Float", - "label": "Exchange Rate", - "oldfieldname": "conversion_rate", - "oldfieldtype": "Currency", - "permlevel": 0, - "precision": "9", - "print_hide": 1, - "read_only": 0, + "description": "Rate at which Customer Currency is converted to customer's base currency", + "fieldname": "conversion_rate", + "fieldtype": "Float", + "label": "Exchange Rate", + "oldfieldname": "conversion_rate", + "oldfieldtype": "Currency", + "permlevel": 0, + "precision": "9", + "print_hide": 1, + "read_only": 0, "reqd": 1 - }, + }, { - "fieldname": "column_break2", - "fieldtype": "Column Break", - "permlevel": 0, - "read_only": 0, + "fieldname": "column_break2", + "fieldtype": "Column Break", + "permlevel": 0, + "read_only": 0, "width": "50%" - }, + }, { - "fieldname": "selling_price_list", - "fieldtype": "Link", - "label": "Price List", - "oldfieldname": "price_list_name", - "oldfieldtype": "Select", - "options": "Price List", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "selling_price_list", + "fieldtype": "Link", + "label": "Price List", + "oldfieldname": "price_list_name", + "oldfieldtype": "Select", + "options": "Price List", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "reqd": 1 - }, + }, { - "fieldname": "price_list_currency", - "fieldtype": "Link", - "label": "Price List Currency", - "options": "Currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, + "fieldname": "price_list_currency", + "fieldtype": "Link", + "label": "Price List Currency", + "options": "Currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, "reqd": 1 - }, + }, { - "description": "Rate at which Price list currency is converted to customer's base currency", - "fieldname": "plc_conversion_rate", - "fieldtype": "Float", - "label": "Price List Exchange Rate", - "no_copy": 0, - "permlevel": 0, - "precision": "9", - "print_hide": 1, - "read_only": 0, + "description": "Rate at which Price list currency is converted to customer's base currency", + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "label": "Price List Exchange Rate", + "no_copy": 0, + "permlevel": 0, + "precision": "9", + "print_hide": 1, + "read_only": 0, "reqd": 1 - }, + }, { - "fieldname": "ignore_pricing_rule", - "fieldtype": "Check", - "label": "Ignore Pricing Rule", - "no_copy": 1, - "permlevel": 1, + "fieldname": "ignore_pricing_rule", + "fieldtype": "Check", + "label": "Ignore Pricing Rule", + "no_copy": 1, + "permlevel": 1, "print_hide": 1 - }, + }, { - "fieldname": "items_section", - "fieldtype": "Section Break", - "label": "", - "oldfieldtype": "Section Break", - "options": "icon-shopping-cart", - "permlevel": 0, + "fieldname": "items_section", + "fieldtype": "Section Break", + "label": "", + "oldfieldtype": "Section Break", + "options": "icon-shopping-cart", + "permlevel": 0, "read_only": 0 - }, + }, { - "fieldname": "update_stock", - "fieldtype": "Check", - "label": "Update Stock", - "oldfieldname": "update_stock", - "oldfieldtype": "Check", - "permlevel": 0, - "print_hide": 1, + "fieldname": "update_stock", + "fieldtype": "Check", + "label": "Update Stock", + "oldfieldname": "update_stock", + "oldfieldtype": "Check", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "allow_on_submit": 1, - "fieldname": "items", - "fieldtype": "Table", - "label": "Items", - "oldfieldname": "entries", - "oldfieldtype": "Table", - "options": "Sales Invoice Item", - "permlevel": 0, - "read_only": 0, + "allow_on_submit": 1, + "fieldname": "items", + "fieldtype": "Table", + "label": "Items", + "oldfieldname": "entries", + "oldfieldtype": "Table", + "options": "Sales Invoice Item", + "permlevel": 0, + "read_only": 0, "reqd": 1 - }, + }, { - "fieldname": "packing_list", - "fieldtype": "Section Break", - "label": "Packing List", - "options": "icon-suitcase", - "permlevel": 0, - "print_hide": 1, + "fieldname": "packing_list", + "fieldtype": "Section Break", + "label": "Packing List", + "options": "icon-suitcase", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "packed_items", - "fieldtype": "Table", - "label": "Packed Items", - "options": "Packed Item", - "permlevel": 0, - "print_hide": 1, + "fieldname": "packed_items", + "fieldtype": "Table", + "label": "Packed Items", + "options": "Packed Item", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "sales_bom_help", - "fieldtype": "HTML", - "label": "Sales BOM Help", - "permlevel": 0, - "print_hide": 1, + "fieldname": "sales_bom_help", + "fieldtype": "HTML", + "label": "Sales BOM Help", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "section_break_30", - "fieldtype": "Section Break", + "fieldname": "section_break_30", + "fieldtype": "Section Break", "permlevel": 0 - }, + }, { - "fieldname": "base_total", - "fieldtype": "Currency", - "label": "Total (Company Currency)", - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, + "fieldname": "base_total", + "fieldtype": "Currency", + "label": "Total (Company Currency)", + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "base_net_total", - "fieldtype": "Currency", - "label": "Net Total (Company Currency)", - "oldfieldname": "net_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, + "fieldname": "base_net_total", + "fieldtype": "Currency", + "label": "Net Total (Company Currency)", + "oldfieldname": "net_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, "reqd": 1 - }, + }, { - "fieldname": "column_break_32", - "fieldtype": "Column Break", + "fieldname": "column_break_32", + "fieldtype": "Column Break", "permlevel": 0 - }, + }, { - "fieldname": "total", - "fieldtype": "Currency", - "label": "Total", - "options": "currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, + "fieldname": "total", + "fieldtype": "Currency", + "label": "Total", + "options": "currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, "read_only": 1 - }, + }, { - "fieldname": "net_total", - "fieldtype": "Currency", - "label": "Net Total", - "options": "currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "net_total", + "fieldtype": "Currency", + "label": "Net Total", + "options": "currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "taxes_section", - "fieldtype": "Section Break", - "label": "Taxes and Charges", - "oldfieldtype": "Section Break", - "options": "icon-money", - "permlevel": 0, + "fieldname": "taxes_section", + "fieldtype": "Section Break", + "label": "Taxes and Charges", + "oldfieldtype": "Section Break", + "options": "icon-money", + "permlevel": 0, "read_only": 0 - }, + }, { - "fieldname": "taxes_and_charges", - "fieldtype": "Link", - "label": "Taxes and Charges", - "oldfieldname": "charge", - "oldfieldtype": "Link", - "options": "Sales Taxes and Charges Template", - "permlevel": 0, - "print_hide": 1, + "fieldname": "taxes_and_charges", + "fieldtype": "Link", + "label": "Taxes and Charges", + "oldfieldname": "charge", + "oldfieldtype": "Link", + "options": "Sales Taxes and Charges Template", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "column_break_38", - "fieldtype": "Column Break", + "fieldname": "column_break_38", + "fieldtype": "Column Break", "permlevel": 0 - }, + }, { - "fieldname": "shipping_rule", - "fieldtype": "Link", - "label": "Shipping Rule", - "oldfieldtype": "Button", - "options": "Shipping Rule", - "permlevel": 0, - "print_hide": 1, + "fieldname": "shipping_rule", + "fieldtype": "Link", + "label": "Shipping Rule", + "oldfieldtype": "Button", + "options": "Shipping Rule", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "section_break_40", - "fieldtype": "Section Break", + "fieldname": "section_break_40", + "fieldtype": "Section Break", "permlevel": 0 - }, + }, { - "allow_on_submit": 1, - "fieldname": "taxes", - "fieldtype": "Table", - "label": "Sales Taxes and Charges", - "oldfieldname": "other_charges", - "oldfieldtype": "Table", - "options": "Sales Taxes and Charges", - "permlevel": 0, + "allow_on_submit": 1, + "fieldname": "taxes", + "fieldtype": "Table", + "label": "Sales Taxes and Charges", + "oldfieldname": "other_charges", + "oldfieldtype": "Table", + "options": "Sales Taxes and Charges", + "permlevel": 0, "read_only": 0 - }, + }, { - "fieldname": "other_charges_calculation", - "fieldtype": "HTML", - "label": "Taxes and Charges Calculation", - "oldfieldtype": "HTML", - "permlevel": 0, - "print_hide": 1, + "fieldname": "other_charges_calculation", + "fieldtype": "HTML", + "label": "Taxes and Charges Calculation", + "oldfieldtype": "HTML", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "section_break_43", - "fieldtype": "Section Break", + "fieldname": "section_break_43", + "fieldtype": "Section Break", "permlevel": 0 - }, + }, { - "fieldname": "base_total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges (Company Currency)", - "oldfieldname": "other_charges_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "base_total_taxes_and_charges", + "fieldtype": "Currency", + "label": "Total Taxes and Charges (Company Currency)", + "oldfieldname": "other_charges_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "column_break_47", - "fieldtype": "Column Break", - "permlevel": 0, + "fieldname": "column_break_47", + "fieldtype": "Column Break", + "permlevel": 0, "precision": "" - }, + }, { - "fieldname": "total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges", - "options": "currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "total_taxes_and_charges", + "fieldtype": "Currency", + "label": "Total Taxes and Charges", + "options": "currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "section_break_49", - "fieldtype": "Section Break", - "permlevel": 0, + "fieldname": "section_break_49", + "fieldtype": "Section Break", + "permlevel": 0, "precision": "" - }, + }, { - "default": "Grand Total", - "fieldname": "apply_discount_on", - "fieldtype": "Select", - "label": "Apply Discount On", - "options": "\nGrand Total\nNet Total", - "permlevel": 0, - "precision": "", + "default": "Grand Total", + "fieldname": "apply_discount_on", + "fieldtype": "Select", + "label": "Apply Discount On", + "options": "\nGrand Total\nNet Total", + "permlevel": 0, + "precision": "", "print_hide": 1 - }, + }, { - "fieldname": "column_break_51", - "fieldtype": "Column Break", + "fieldname": "column_break_51", + "fieldtype": "Column Break", "permlevel": 0 - }, + }, { - "fieldname": "discount_amount", - "fieldtype": "Currency", - "label": "Discount Amount", - "options": "currency", - "permlevel": 0, + "fieldname": "discount_amount", + "fieldtype": "Currency", + "label": "Discount Amount", + "options": "currency", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "base_discount_amount", - "fieldtype": "Currency", - "label": "Discount Amount (Company Currency)", - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, + "fieldname": "base_discount_amount", + "fieldtype": "Currency", + "label": "Discount Amount (Company Currency)", + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "totals", - "fieldtype": "Section Break", - "label": "", - "oldfieldtype": "Section Break", - "options": "icon-money", - "permlevel": 0, - "print_hide": 1, + "fieldname": "totals", + "fieldtype": "Section Break", + "label": "", + "oldfieldtype": "Section Break", + "options": "icon-money", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "base_grand_total", - "fieldtype": "Currency", - "in_filter": 1, - "label": "Grand Total (Company Currency)", - "oldfieldname": "grand_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, - "reqd": 1, + "fieldname": "base_grand_total", + "fieldtype": "Currency", + "in_filter": 1, + "label": "Grand Total (Company Currency)", + "oldfieldname": "grand_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, + "reqd": 1, "search_index": 0 - }, + }, { - "fieldname": "base_rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total (Company Currency)", - "oldfieldname": "rounded_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "base_rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total (Company Currency)", + "oldfieldname": "rounded_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "description": "In Words will be visible once you save the Sales Invoice.", - "fieldname": "base_in_words", - "fieldtype": "Data", - "label": "In Words (Company Currency)", - "oldfieldname": "in_words", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 1, + "description": "In Words will be visible once you save the Sales Invoice.", + "fieldname": "base_in_words", + "fieldtype": "Data", + "label": "In Words (Company Currency)", + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "column_break5", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "column_break5", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "width": "50%" - }, + }, { - "fieldname": "grand_total", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Grand Total", - "oldfieldname": "grand_total_export", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "read_only": 1, + "fieldname": "grand_total", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Grand Total", + "oldfieldname": "grand_total_export", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 1, "reqd": 1 - }, + }, { - "fieldname": "rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total", - "oldfieldname": "rounded_total_export", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, + "fieldname": "rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total", + "oldfieldname": "rounded_total_export", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, "read_only": 1 - }, + }, { - "fieldname": "in_words", - "fieldtype": "Data", - "label": "In Words", - "oldfieldname": "in_words_export", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, + "fieldname": "in_words", + "fieldtype": "Data", + "label": "In Words", + "oldfieldname": "in_words_export", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, "read_only": 1 - }, + }, { - "fieldname": "total_advance", - "fieldtype": "Currency", - "label": "Total Advance", - "oldfieldname": "total_advance", - "oldfieldtype": "Currency", - "options": "", - "permlevel": 0, - "print_hide": 1, + "fieldname": "total_advance", + "fieldtype": "Currency", + "label": "Total Advance", + "oldfieldname": "total_advance", + "oldfieldtype": "Currency", + "options": "", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "outstanding_amount", - "fieldtype": "Currency", - "in_list_view": 0, - "label": "Outstanding Amount", - "no_copy": 1, - "oldfieldname": "outstanding_amount", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "outstanding_amount", + "fieldtype": "Currency", + "in_list_view": 0, + "label": "Outstanding Amount", + "no_copy": 1, + "oldfieldname": "outstanding_amount", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "advances_section", - "fieldtype": "Section Break", - "label": "Advances", - "oldfieldtype": "Section Break", - "options": "icon-money", - "permlevel": 0, - "print_hide": 1, + "fieldname": "advances_section", + "fieldtype": "Section Break", + "label": "Advances", + "oldfieldtype": "Section Break", + "options": "icon-money", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "get_advances_received", - "fieldtype": "Button", - "label": "Get Advances Received", - "oldfieldtype": "Button", - "options": "get_advances", - "permlevel": 0, - "print_hide": 1, + "fieldname": "get_advances_received", + "fieldtype": "Button", + "label": "Get Advances Received", + "oldfieldtype": "Button", + "options": "get_advances", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "advances", - "fieldtype": "Table", - "label": "Advances", - "oldfieldname": "advance_adjustment_details", - "oldfieldtype": "Table", - "options": "Sales Invoice Advance", - "permlevel": 0, - "print_hide": 1, + "fieldname": "advances", + "fieldtype": "Table", + "label": "Advances", + "oldfieldname": "advance_adjustment_details", + "oldfieldtype": "Table", + "options": "Sales Invoice Advance", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "depends_on": "eval:doc.is_pos===1||(doc.advances && doc.advances.length>0)", - "fieldname": "payments_section", - "fieldtype": "Section Break", - "label": "Payments", - "options": "icon-money", - "permlevel": 0, + "depends_on": "eval:doc.is_pos===1||(doc.advances && doc.advances.length>0)", + "fieldname": "payments_section", + "fieldtype": "Section Break", + "label": "Payments", + "options": "icon-money", + "permlevel": 0, "read_only": 0 - }, + }, { - "depends_on": "is_pos", - "fieldname": "paid_amount", - "fieldtype": "Currency", - "label": "Paid Amount", - "no_copy": 1, - "oldfieldname": "paid_amount", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 1, + "depends_on": "is_pos", + "fieldname": "paid_amount", + "fieldtype": "Currency", + "label": "Paid Amount", + "no_copy": 1, + "oldfieldname": "paid_amount", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "depends_on": "is_pos", - "fieldname": "column_break3", - "fieldtype": "Column Break", - "permlevel": 0, - "read_only": 0, + "depends_on": "is_pos", + "fieldname": "column_break3", + "fieldtype": "Column Break", + "permlevel": 0, + "read_only": 0, "width": "50%" - }, + }, { - "depends_on": "is_pos", - "fieldname": "cash_bank_account", - "fieldtype": "Link", - "label": "Cash/Bank Account", - "oldfieldname": "cash_bank_account", - "oldfieldtype": "Link", - "options": "Account", - "permlevel": 0, - "print_hide": 1, + "depends_on": "is_pos", + "fieldname": "cash_bank_account", + "fieldtype": "Link", + "label": "Cash/Bank Account", + "oldfieldname": "cash_bank_account", + "oldfieldtype": "Link", + "options": "Account", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "depends_on": "grand_total", - "fieldname": "column_break4", - "fieldtype": "Section Break", - "label": "Write Off", - "permlevel": 0, - "read_only": 0, + "depends_on": "grand_total", + "fieldname": "column_break4", + "fieldtype": "Section Break", + "label": "", + "permlevel": 0, + "read_only": 0, "width": "50%" - }, + }, { - "depends_on": "", - "fieldname": "write_off_amount", - "fieldtype": "Currency", - "label": "Write Off Amount", - "no_copy": 1, - "options": "currency", - "permlevel": 0, - "print_hide": 1, + "depends_on": "", + "fieldname": "write_off_amount", + "fieldtype": "Currency", + "label": "Write Off Amount", + "no_copy": 1, + "options": "currency", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "depends_on": "", - "fieldname": "write_off_outstanding_amount_automatically", - "fieldtype": "Check", - "label": "Write Off Outstanding Amount", - "permlevel": 0, - "print_hide": 1, + "depends_on": "", + "fieldname": "write_off_outstanding_amount_automatically", + "fieldtype": "Check", + "label": "Write Off Outstanding Amount", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "depends_on": "eval:doc.is_pos===1||(doc.advances && doc.advances.length>0)", - "fieldname": "column_break_74", - "fieldtype": "Column Break", - "permlevel": 0, + "depends_on": "eval:doc.is_pos===1||(doc.advances && doc.advances.length>0)", + "fieldname": "column_break_74", + "fieldtype": "Column Break", + "permlevel": 0, "precision": "" - }, + }, { - "depends_on": "", - "fieldname": "write_off_account", - "fieldtype": "Link", - "label": "Write Off Account", - "options": "Account", - "permlevel": 0, - "print_hide": 1, + "depends_on": "", + "fieldname": "write_off_account", + "fieldtype": "Link", + "label": "Write Off Account", + "options": "Account", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "depends_on": "", - "fieldname": "write_off_cost_center", - "fieldtype": "Link", - "label": "Write Off Cost Center", - "options": "Cost Center", - "permlevel": 0, - "print_hide": 1, + "depends_on": "", + "fieldname": "write_off_cost_center", + "fieldtype": "Link", + "label": "Write Off Cost Center", + "options": "Cost Center", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "fold", - "fieldtype": "Fold", + "fieldname": "fold", + "fieldtype": "Fold", "permlevel": 0 - }, + }, { - "fieldname": "terms_section_break", - "fieldtype": "Section Break", - "label": "Terms and Conditions", - "oldfieldtype": "Section Break", - "options": "icon-legal", - "permlevel": 0, + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "label": "", + "oldfieldtype": "Section Break", + "options": "icon-legal", + "permlevel": 0, "read_only": 0 - }, + }, { - "fieldname": "tc_name", - "fieldtype": "Link", - "label": "Terms", - "oldfieldname": "tc_name", - "oldfieldtype": "Link", - "options": "Terms and Conditions", - "permlevel": 0, - "print_hide": 1, + "fieldname": "tc_name", + "fieldtype": "Link", + "label": "Terms", + "oldfieldname": "tc_name", + "oldfieldtype": "Link", + "options": "Terms and Conditions", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "terms", - "fieldtype": "Text Editor", - "label": "Terms and Conditions Details", - "oldfieldname": "terms", - "oldfieldtype": "Text Editor", - "permlevel": 0, + "fieldname": "terms", + "fieldtype": "Text Editor", + "label": "Terms and Conditions Details", + "oldfieldname": "terms", + "oldfieldtype": "Text Editor", + "permlevel": 0, "read_only": 0 - }, + }, { - "depends_on": "customer", - "fieldname": "contact_section", - "fieldtype": "Section Break", - "hidden": 0, - "label": "Contact Info", - "options": "icon-bullhorn", - "permlevel": 0, + "depends_on": "customer", + "fieldname": "contact_section", + "fieldtype": "Section Break", + "hidden": 0, + "label": "", + "options": "icon-bullhorn", + "permlevel": 0, "read_only": 0 - }, + }, { - "description": "", - "fieldname": "territory", - "fieldtype": "Link", - "in_filter": 1, - "label": "Territory", - "options": "Territory", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "reqd": 1, + "description": "", + "fieldname": "territory", + "fieldtype": "Link", + "in_filter": 1, + "label": "Territory", + "options": "Territory", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "reqd": 1, "search_index": 0 - }, + }, { - "description": "", - "fieldname": "customer_group", - "fieldtype": "Link", - "in_filter": 1, - "label": "Customer Group", - "options": "Customer Group", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "description": "", + "fieldname": "customer_group", + "fieldtype": "Link", + "in_filter": 1, + "label": "Customer Group", + "options": "Customer Group", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "search_index": 0 - }, + }, { - "fieldname": "col_break23", - "fieldtype": "Column Break", - "permlevel": 0, - "read_only": 0, + "fieldname": "col_break23", + "fieldtype": "Column Break", + "permlevel": 0, + "read_only": 0, "width": "50%" - }, + }, { - "fieldname": "customer_address", - "fieldtype": "Link", - "label": "Customer Address", - "options": "Address", - "permlevel": 0, - "print_hide": 1, + "fieldname": "customer_address", + "fieldtype": "Link", + "label": "Customer Address", + "options": "Address", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "contact_person", - "fieldtype": "Link", - "label": "Contact Person", - "options": "Contact", - "permlevel": 0, - "print_hide": 1, + "fieldname": "contact_person", + "fieldtype": "Link", + "label": "Contact Person", + "options": "Contact", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "more_info", - "fieldtype": "Section Break", - "label": "More Info", - "oldfieldtype": "Section Break", - "options": "icon-file-text", - "permlevel": 0, - "print_hide": 1, + "fieldname": "more_info", + "fieldtype": "Section Break", + "label": "", + "oldfieldtype": "Section Break", + "options": "icon-file-text", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "description": "Customer (Receivable) Account", - "fieldname": "debit_to", - "fieldtype": "Link", - "in_filter": 1, - "label": "Debit To", - "oldfieldname": "debit_to", - "oldfieldtype": "Link", - "options": "Account", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "reqd": 1, + "description": "Customer (Receivable) Account", + "fieldname": "debit_to", + "fieldtype": "Link", + "in_filter": 1, + "label": "Debit To", + "oldfieldname": "debit_to", + "oldfieldtype": "Link", + "options": "Account", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "reqd": 1, "search_index": 1 - }, + }, { - "fieldname": "project_name", - "fieldtype": "Link", - "in_filter": 1, - "label": "Project Name", - "oldfieldname": "project_name", - "oldfieldtype": "Link", - "options": "Project", - "permlevel": 0, - "read_only": 0, + "fieldname": "project_name", + "fieldtype": "Link", + "in_filter": 1, + "label": "Project Name", + "oldfieldname": "project_name", + "oldfieldtype": "Link", + "options": "Project", + "permlevel": 0, + "read_only": 0, "search_index": 1 - }, + }, { - "depends_on": "eval:doc.source == 'Campaign'", - "fieldname": "campaign", - "fieldtype": "Link", - "label": "Campaign", - "oldfieldname": "campaign", - "oldfieldtype": "Link", - "options": "Campaign", - "permlevel": 0, - "print_hide": 1, + "depends_on": "eval:doc.source == 'Campaign'", + "fieldname": "campaign", + "fieldtype": "Link", + "label": "Campaign", + "oldfieldname": "campaign", + "oldfieldtype": "Link", + "options": "Campaign", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "source", - "fieldtype": "Select", - "label": "Source", - "oldfieldname": "source", - "oldfieldtype": "Select", - "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", - "permlevel": 0, - "print_hide": 1, + "fieldname": "source", + "fieldtype": "Select", + "label": "Source", + "oldfieldname": "source", + "oldfieldtype": "Select", + "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "default": "No", - "description": "Considered as an Opening Balance", - "fieldname": "is_opening", - "fieldtype": "Select", - "in_filter": 1, - "label": "Is Opening Entry", - "oldfieldname": "is_opening", - "oldfieldtype": "Select", - "options": "No\nYes", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "default": "No", + "description": "Considered as an Opening Balance", + "fieldname": "is_opening", + "fieldtype": "Select", + "in_filter": 1, + "label": "Is Opening Entry", + "oldfieldname": "is_opening", + "oldfieldtype": "Select", + "options": "No\nYes", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "search_index": 0 - }, + }, { - "fieldname": "c_form_applicable", - "fieldtype": "Select", - "label": "C-Form Applicable", - "no_copy": 1, - "options": "No\nYes", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "c_form_applicable", + "fieldtype": "Select", + "label": "C-Form Applicable", + "no_copy": 1, + "options": "No\nYes", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "report_hide": 0 - }, + }, { - "fieldname": "c_form_no", - "fieldtype": "Link", - "label": "C-Form No", - "no_copy": 1, - "options": "C-Form", - "permlevel": 0, - "print_hide": 1, + "fieldname": "c_form_no", + "fieldtype": "Link", + "label": "C-Form No", + "no_copy": 1, + "options": "C-Form", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "column_break8", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, + "fieldname": "column_break8", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "allow_on_submit": 1, - "fieldname": "letter_head", - "fieldtype": "Link", - "label": "Letter Head", - "oldfieldname": "letter_head", - "oldfieldtype": "Select", - "options": "Letter Head", - "permlevel": 0, - "print_hide": 1, + "allow_on_submit": 1, + "fieldname": "letter_head", + "fieldtype": "Link", + "label": "Letter Head", + "oldfieldname": "letter_head", + "oldfieldtype": "Select", + "options": "Letter Head", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "allow_on_submit": 1, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "label": "Print Heading", - "no_copy": 1, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "allow_on_submit": 1, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "label": "Print Heading", + "no_copy": 1, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "report_hide": 1 - }, + }, { - "fieldname": "posting_time", - "fieldtype": "Time", - "label": "Posting Time", - "no_copy": 1, - "oldfieldname": "posting_time", - "oldfieldtype": "Time", - "permlevel": 0, - "print_hide": 1, + "fieldname": "posting_time", + "fieldtype": "Time", + "label": "Posting Time", + "no_copy": 1, + "oldfieldname": "posting_time", + "oldfieldtype": "Time", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "fiscal_year", - "fieldtype": "Link", - "in_filter": 1, - "label": "Fiscal Year", - "no_copy": 0, - "oldfieldname": "fiscal_year", - "oldfieldtype": "Select", - "options": "Fiscal Year", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "reqd": 1, + "fieldname": "fiscal_year", + "fieldtype": "Link", + "in_filter": 1, + "label": "Fiscal Year", + "no_copy": 0, + "oldfieldname": "fiscal_year", + "oldfieldtype": "Select", + "options": "Fiscal Year", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "reqd": 1, "search_index": 0 - }, + }, { - "fieldname": "remarks", - "fieldtype": "Small Text", - "label": "Remarks", - "no_copy": 1, - "oldfieldname": "remarks", - "oldfieldtype": "Text", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "remarks", + "fieldtype": "Small Text", + "label": "Remarks", + "no_copy": 1, + "oldfieldname": "remarks", + "oldfieldtype": "Text", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "reqd": 0 - }, + }, { - "fieldname": "sales_team_section_break", - "fieldtype": "Section Break", - "label": "Sales Team", - "oldfieldtype": "Section Break", - "options": "icon-group", - "permlevel": 0, - "print_hide": 1, + "fieldname": "sales_team_section_break", + "fieldtype": "Section Break", + "label": "", + "oldfieldtype": "Section Break", + "options": "icon-group", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "column_break9", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "column_break9", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "width": "50%" - }, + }, { - "fieldname": "sales_partner", - "fieldtype": "Link", - "in_filter": 1, - "label": "Sales Partner", - "oldfieldname": "sales_partner", - "oldfieldtype": "Link", - "options": "Sales Partner", - "permlevel": 0, - "print_hide": 1, + "fieldname": "sales_partner", + "fieldtype": "Link", + "in_filter": 1, + "label": "Sales Partner", + "oldfieldname": "sales_partner", + "oldfieldtype": "Link", + "options": "Sales Partner", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "column_break10", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "column_break10", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "width": "50%" - }, + }, { - "fieldname": "commission_rate", - "fieldtype": "Float", - "label": "Commission Rate (%)", - "oldfieldname": "commission_rate", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "commission_rate", + "fieldtype": "Float", + "label": "Commission Rate (%)", + "oldfieldname": "commission_rate", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "total_commission", - "fieldtype": "Currency", - "label": "Total Commission", - "oldfieldname": "total_commission", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "total_commission", + "fieldtype": "Currency", + "label": "Total Commission", + "oldfieldname": "total_commission", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "section_break2", - "fieldtype": "Section Break", - "permlevel": 0, - "print_hide": 1, + "fieldname": "section_break2", + "fieldtype": "Section Break", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "sales_team", - "fieldtype": "Table", - "label": "Sales Team1", - "oldfieldname": "sales_team", - "oldfieldtype": "Table", - "options": "Sales Team", - "permlevel": 0, - "print_hide": 1, + "fieldname": "sales_team", + "fieldtype": "Table", + "label": "Sales Team1", + "oldfieldname": "sales_team", + "oldfieldtype": "Table", + "options": "Sales Team", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "depends_on": "eval:doc.docstatus<2", - "fieldname": "recurring_invoice", - "fieldtype": "Section Break", - "label": "Recurring Invoice", - "options": "icon-time", - "permlevel": 0, - "print_hide": 1, + "depends_on": "eval:doc.docstatus<2", + "fieldname": "recurring_invoice", + "fieldtype": "Section Break", + "label": "Recurring Invoice", + "options": "icon-time", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "column_break11", - "fieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "column_break11", + "fieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "width": "50%" - }, + }, { - "allow_on_submit": 1, - "depends_on": "eval:doc.docstatus<2", - "description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date", - "fieldname": "is_recurring", - "fieldtype": "Check", - "label": "Is Recurring", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, + "allow_on_submit": 1, + "depends_on": "eval:doc.docstatus<2", + "description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date", + "fieldname": "is_recurring", + "fieldtype": "Check", + "label": "Is Recurring", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "allow_on_submit": 1, - "depends_on": "eval:doc.is_recurring==1", - "description": "Select the period when the invoice will be generated automatically", - "fieldname": "recurring_type", - "fieldtype": "Select", - "label": "Recurring Type", - "no_copy": 1, - "options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly", - "permlevel": 0, - "print_hide": 1, + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "Select the period when the invoice will be generated automatically", + "fieldname": "recurring_type", + "fieldtype": "Select", + "label": "Recurring Type", + "no_copy": 1, + "options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "allow_on_submit": 1, - "depends_on": "eval:doc.is_recurring==1", - "description": "Start date of current invoice's period", - "fieldname": "from_date", - "fieldtype": "Date", - "label": "From Date", - "no_copy": 1, - "permlevel": 0, - "print_hide": 0, + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "Start date of current invoice's period", + "fieldname": "from_date", + "fieldtype": "Date", + "label": "From Date", + "no_copy": 1, + "permlevel": 0, + "print_hide": 0, "read_only": 0 - }, + }, { - "allow_on_submit": 1, - "depends_on": "eval:doc.is_recurring==1", - "description": "End date of current invoice's period", - "fieldname": "to_date", - "fieldtype": "Date", - "label": "To Date", - "no_copy": 1, - "permlevel": 0, - "print_hide": 0, + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "End date of current invoice's period", + "fieldname": "to_date", + "fieldtype": "Date", + "label": "To Date", + "no_copy": 1, + "permlevel": 0, + "print_hide": 0, "read_only": 0 - }, + }, { - "allow_on_submit": 1, - "depends_on": "eval:doc.is_recurring==1", - "description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc ", - "fieldname": "repeat_on_day_of_month", - "fieldtype": "Int", - "label": "Repeat on Day of Month", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc ", + "fieldname": "repeat_on_day_of_month", + "fieldtype": "Int", + "label": "Repeat on Day of Month", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "allow_on_submit": 1, - "depends_on": "eval:doc.is_recurring==1", - "description": "The date on which recurring invoice will be stop", - "fieldname": "end_date", - "fieldtype": "Date", - "label": "End Date", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "The date on which recurring invoice will be stop", + "fieldname": "end_date", + "fieldtype": "Date", + "label": "End Date", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "column_break12", - "fieldtype": "Column Break", - "no_copy": 0, - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "column_break12", + "fieldtype": "Column Break", + "no_copy": 0, + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "width": "50%" - }, + }, { - "depends_on": "eval:doc.is_recurring==1", - "description": "The date on which next invoice will be generated. It is generated on submit.\n", - "fieldname": "next_date", - "fieldtype": "Date", - "label": "Next Date", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "The date on which next invoice will be generated. It is generated on submit.\n", + "fieldname": "next_date", + "fieldtype": "Date", + "label": "Next Date", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "depends_on": "eval:doc.is_recurring==1", - "description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.", - "fieldname": "recurring_id", - "fieldtype": "Data", - "label": "Recurring Id", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.", + "fieldname": "recurring_id", + "fieldtype": "Data", + "label": "Recurring Id", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "allow_on_submit": 1, - "depends_on": "eval:doc.is_recurring==1", - "description": "Enter email id separated by commas, invoice will be mailed automatically on particular date", - "fieldname": "notification_email_address", - "fieldtype": "Small Text", - "label": "Notification Email Address", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "Enter email id separated by commas, invoice will be mailed automatically on particular date", + "fieldname": "notification_email_address", + "fieldtype": "Small Text", + "label": "Notification Email Address", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "against_income_account", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Against Income Account", - "no_copy": 1, - "oldfieldname": "against_income_account", - "oldfieldtype": "Small Text", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "against_income_account", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Against Income Account", + "no_copy": 1, + "oldfieldname": "against_income_account", + "oldfieldtype": "Small Text", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "report_hide": 1 } - ], - "icon": "icon-file-text", - "idx": 1, - "is_submittable": 1, - "modified": "2015-04-27 20:31:51.966965", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Sales Invoice", - "owner": "Administrator", + ], + "icon": "icon-file-text", + "idx": 1, + "is_submittable": 1, + "modified": "2015-05-21 05:34:21.539823", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Sales Invoice", + "owner": "Administrator", "permissions": [ { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager", - "share": 1, - "submit": 1, + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "share": 1, + "submit": 1, "write": 1 - }, + }, { - "amend": 1, - "apply_user_permissions": 1, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "share": 1, - "submit": 1, + "amend": 1, + "apply_user_permissions": 1, + "cancel": 0, + "create": 1, + "delete": 0, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "share": 1, + "submit": 1, "write": 1 - }, + }, { - "apply_user_permissions": 1, - "cancel": 0, - "delete": 0, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, + "apply_user_permissions": 1, + "cancel": 0, + "delete": 0, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, "role": "Customer" - }, + }, { - "permlevel": 1, - "read": 1, - "role": "Accounts Manager", + "permlevel": 1, + "read": 1, + "role": "Accounts Manager", "write": 1 } - ], - "read_only_onload": 1, - "search_fields": "posting_date, due_date, customer, fiscal_year, base_grand_total, outstanding_amount", - "sort_field": "modified", - "sort_order": "DESC", + ], + "read_only_onload": 1, + "search_fields": "posting_date, due_date, customer, fiscal_year, base_grand_total, outstanding_amount", + "sort_field": "modified", + "sort_order": "DESC", "title_field": "customer_name" -} +} \ No newline at end of file From 8c6ff9ddadd58e31f8a6e4160755f2d4227dbb1f Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Thu, 21 May 2015 16:04:34 +0600 Subject: [PATCH 15/15] bumped to version 5.0.7 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 721b4757a2..76a0d5780d 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1,2 +1,2 @@ from __future__ import unicode_literals -__version__ = '5.0.6' +__version__ = '5.0.7' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index c16d9b1ae6..4a2e60d31a 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -5,7 +5,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "5.0.6" +app_version = "5.0.7" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 31eea3dd45..fb71b6230e 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = "5.0.6" +version = "5.0.7" with open("requirements.txt", "r") as f: install_requires = f.readlines()