diff --git a/erpnext/__init__.py b/erpnext/__init__.py index d916789ae55..3f501ade365 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '7.2.18' +__version__ = '7.2.25' def get_default_company(user=None): '''Get default company for user''' diff --git a/erpnext/accounts/doctype/account/account.json b/erpnext/accounts/doctype/account/account.json index 7a845ceb9b4..3c9f2338c53 100644 --- a/erpnext/accounts/doctype/account/account.json +++ b/erpnext/accounts/doctype/account/account.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -76,7 +78,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Account Name", @@ -107,6 +110,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Group", @@ -134,7 +138,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Company", @@ -165,6 +170,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Root Type", @@ -193,6 +199,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Report Type", @@ -222,6 +229,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Currency", @@ -251,6 +259,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -278,6 +287,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Parent Account", @@ -308,7 +318,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Account Type", @@ -340,6 +351,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rate", @@ -370,6 +382,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Frozen", @@ -400,6 +413,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Warehouse", @@ -428,6 +442,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Balance must be", @@ -456,6 +471,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Lft", @@ -483,6 +499,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rgt", @@ -510,6 +527,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Old Parent", @@ -538,7 +556,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-12-15 14:43:50.121671", + "modified": "2017-02-17 16:22:49.249075", "modified_by": "Administrator", "module": "Accounts", "name": "Account", @@ -554,7 +572,6 @@ "export": 1, "if_owner": 0, "import": 1, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -575,7 +592,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -596,7 +612,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -617,7 +632,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -638,7 +652,6 @@ "export": 1, "if_owner": 0, "import": 1, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -654,6 +667,8 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "", + "show_name_in_global_search": 1, "sort_order": "ASC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json index 68ab3fcb0c6..9a9342305c6 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json @@ -341,9 +341,7 @@ "Post Dated Cheques Paid": { "account_type": "Payable" }, - "Staff Payable": { - "account_type": "Payable" - }, + "Staff Payable": {}, "Suppliers Price Protection": { "account_type": "Payable" }, diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json index c7a80455044..b3c789162e2 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json @@ -136,7 +136,8 @@ "Accounts Payable": { "Creditors": { "account_type": "Payable" - } + }, + "Payroll Payable": {} }, "Stock Liabilities": { "Stock Received But Not Billed": { diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_default_coa.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_default_coa.json index b2669148c8a..58a89b53a54 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_default_coa.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_default_coa.json @@ -265,7 +265,8 @@ "Accounts Payable": { "Creditors": { "account_type": "Payable" - } + }, + "Payroll Payable": {} }, "Duties and Taxes": { "Deferred Tax Liabilities-Current": {}, diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_fnb_coa.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_fnb_coa.json index 961912deee7..15c2468492e 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_fnb_coa.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_fnb_coa.json @@ -142,7 +142,8 @@ "Accounts Payable": { "Creditors":{ "account_type": "Payable" - } + }, + "Payroll Payable": {} }, "Duties and Taxes": { "account_type": "Tax", diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py index 5824704fb34..c6495c18a69 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py @@ -137,7 +137,8 @@ def get(): _("Accounts Payable"): { _("Creditors"): { "account_type": "Payable" - } + }, + _("Payroll Payable"): {}, }, _("Stock Liabilities"): { _("Stock Received But Not Billed"): { diff --git a/erpnext/accounts/doctype/asset/asset.json b/erpnext/accounts/doctype/asset/asset.json index d093e69aa08..469daa05ae5 100644 --- a/erpnext/accounts/doctype/asset/asset.json +++ b/erpnext/accounts/doctype/asset/asset.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Asset Name", @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Item Code", @@ -68,6 +70,36 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "item_name", + "fieldtype": "Read Only", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Item Name", + "length": 0, + "no_copy": 0, + "options": "item_code.item_name", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -79,6 +111,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 1, "label": "Asset Category", @@ -109,6 +142,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Status", @@ -138,6 +172,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Image", @@ -166,6 +201,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -193,6 +229,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -222,6 +259,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Warehouse", @@ -251,6 +289,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Existing Asset", @@ -279,6 +318,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Purchase Date", @@ -307,6 +347,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier", @@ -336,6 +377,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Purchase Invoice", @@ -365,6 +407,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Disposal Date", @@ -393,6 +436,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Journal Entry for Scrap", @@ -422,6 +466,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -449,6 +494,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Gross Purchase Amount", @@ -479,6 +525,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Expected Value After Useful Life", @@ -509,6 +556,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Opening Accumulated Depreciation", @@ -538,6 +586,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Value After Depreciation", @@ -567,6 +616,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -596,6 +646,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Depreciation Method", @@ -625,6 +676,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Number of Depreciations", @@ -654,6 +706,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Number of Depreciations Booked", @@ -682,6 +735,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Frequency of Depreciation (Months)", @@ -711,6 +765,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Next Depreciation Date", @@ -739,6 +794,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Depreciation Schedule", @@ -767,6 +823,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Depreciation Schedules", @@ -796,6 +853,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -825,7 +883,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-18 15:59:19.774500", + "modified": "2017-02-17 16:26:19.111939", "modified_by": "Administrator", "module": "Accounts", "name": "Asset", @@ -842,7 +900,6 @@ "export": 1, "if_owner": 0, "import": 1, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -857,7 +914,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 1, + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/asset/asset.py b/erpnext/accounts/doctype/asset/asset.py index 9caac071f9d..b8d0ec8170a 100644 --- a/erpnext/accounts/doctype/asset/asset.py +++ b/erpnext/accounts/doctype/asset/asset.py @@ -81,7 +81,10 @@ class Asset(Document): frappe.throw(_("Number of Depreciations Booked cannot be greater than Total Number of Depreciations")) if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(nowdate()): - frappe.msgprint(_("Next Depreciation Date is entered as past date")) + frappe.msgprint(_("Next Depreciation Date is entered as past date"), title=_('Warning'), indicator='red') + + if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(self.purchase_date): + frappe.throw(_("Next Depreciation Date cannot be before Purchase Date")) if (flt(self.value_after_depreciation) > flt(self.expected_value_after_useful_life) and not self.next_depreciation_date): @@ -242,4 +245,4 @@ def get_item_details(item_code): "asset_category": asset_category }) - return ret \ No newline at end of file + return ret diff --git a/erpnext/accounts/doctype/asset_category/asset_category.json b/erpnext/accounts/doctype/asset_category/asset_category.json index 0ffdefc2c74..74762d790ca 100644 --- a/erpnext/accounts/doctype/asset_category/asset_category.json +++ b/erpnext/accounts/doctype/asset_category/asset_category.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Asset Category Name", @@ -52,6 +53,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Depreciation Method", @@ -81,6 +83,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -108,6 +111,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Number of Depreciations", @@ -136,6 +140,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Frequency of Depreciation (Months)", @@ -164,6 +169,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accounts", @@ -192,6 +198,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accounts", @@ -221,7 +228,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:49:42.600981", + "modified": "2017-02-17 16:09:52.955332", "modified_by": "Administrator", "module": "Accounts", "name": "Asset Category", @@ -238,7 +245,6 @@ "export": 1, "if_owner": 0, "import": 1, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -259,7 +265,6 @@ "export": 1, "if_owner": 0, "import": 1, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -274,7 +279,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/asset_movement/asset_movement.json b/erpnext/accounts/doctype/asset_movement/asset_movement.json index 710f3b5b792..a1189f50351 100644 --- a/erpnext/accounts/doctype/asset_movement/asset_movement.json +++ b/erpnext/accounts/doctype/asset_movement/asset_movement.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 1, "label": "Asset", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Transaction Date", @@ -79,6 +81,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Company", @@ -108,6 +111,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -135,6 +139,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Source Warehouse", @@ -164,6 +169,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Target Warehouse", @@ -193,6 +199,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -221,7 +228,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:49:47.558549", + "modified": "2017-02-17 16:09:32.069344", "modified_by": "Administrator", "module": "Accounts", "name": "Asset Movement", @@ -238,7 +245,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -259,7 +265,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -280,7 +285,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -295,7 +299,9 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py index abc6ebaf9c0..11dcfe7537f 100644 --- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py +++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py @@ -74,6 +74,9 @@ class BankReconciliation(Document): clearance_date_updated = False for d in self.get('payment_entries'): if d.clearance_date: + if not d.payment_document: + frappe.throw(_("Row #{0}: Payment document is required to complete the trasaction")) + if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date): frappe.throw(_("Row #{0}: Clearance date {1} cannot be before Cheque Date {2}") .format(d.idx, d.clearance_date, d.cheque_date)) diff --git a/erpnext/accounts/doctype/budget/budget.json b/erpnext/accounts/doctype/budget/budget.json index 1e556011ac9..45f549e9f2d 100644 --- a/erpnext/accounts/doctype/budget/budget.json +++ b/erpnext/accounts/doctype/budget/budget.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Budget Against", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Company", @@ -81,6 +83,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 1, "label": "Cost Center", @@ -111,6 +114,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Project", @@ -140,6 +144,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Fiscal Year", @@ -169,6 +174,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -197,6 +203,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Action if Annual Budget Exceeded", @@ -228,6 +235,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Action if Accumulated Monthly Budget Exceeded", @@ -258,6 +266,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Monthly Distribution", @@ -287,6 +296,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -315,6 +325,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -342,6 +353,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Budget Accounts", @@ -371,7 +383,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-12-15 14:45:31.079107", + "modified": "2017-02-17 16:25:32.342055", "modified_by": "Administrator", "module": "Accounts", "name": "Budget", @@ -388,7 +400,6 @@ "export": 1, "if_owner": 0, "import": 1, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -403,7 +414,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/cost_center/cost_center.json b/erpnext/accounts/doctype/cost_center/cost_center.json index f590b5d5fa1..9eddeec04ff 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center.json +++ b/erpnext/accounts/doctype/cost_center/cost_center.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Cost Center Name", @@ -79,6 +81,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Parent Cost Center", @@ -109,6 +112,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Company", @@ -139,6 +143,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -167,6 +172,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Group", @@ -194,7 +200,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "lft", @@ -223,7 +230,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "rgt", @@ -253,6 +261,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "old_parent", @@ -278,14 +287,14 @@ "icon": "fa fa-money", "idx": 1, "image_view": 0, - "in_create": 1, + "in_create": 0, "in_dialog": 0, "is_submittable": 0, "issingle": 0, "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2016-11-07 05:20:40.282432", + "modified": "2017-02-17 16:22:27.129572", "modified_by": "Administrator", "module": "Accounts", "name": "Cost Center", @@ -301,7 +310,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -322,7 +330,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -343,7 +350,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -364,7 +370,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -385,7 +390,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -401,6 +405,8 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "parent_cost_center, is_group", + "show_name_in_global_search": 1, "sort_order": "ASC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json index f8284e624ec..f12de7915ae 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json @@ -3,24 +3,30 @@ "allow_import": 1, "allow_rename": 0, "autoname": "field:year", + "beta": 0, "creation": "2013-01-22 16:50:25", "custom": 0, "description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.", "docstatus": 0, "doctype": "DocType", "document_type": "Setup", + "editable_grid": 0, "fields": [ { "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "description": "For e.g. 2012, 2012-13", "fieldname": "year", "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Year Name", "length": 0, "no_copy": 0, @@ -28,7 +34,9 @@ "oldfieldtype": "Data", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -39,19 +47,25 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "disabled", "fieldtype": "Check", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Disabled", "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -62,12 +76,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "year_start_date", "fieldtype": "Date", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Year Start Date", "length": 0, "no_copy": 1, @@ -75,7 +93,9 @@ "oldfieldtype": "Date", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -86,18 +106,24 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "year_end_date", "fieldtype": "Date", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Year End Date", "length": 0, "no_copy": 1, "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -108,12 +134,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "companies", "fieldtype": "Table", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Companies", "length": 0, "no_copy": 0, @@ -121,7 +151,9 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -133,13 +165,14 @@ "hide_toolbar": 0, "icon": "fa fa-calendar", "idx": 1, + "image_view": 0, "in_create": 0, "in_dialog": 0, "is_submittable": 0, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2015-11-16 06:29:47.289982", + "modified": "2017-02-17 16:22:08.431278", "modified_by": "Administrator", "module": "Accounts", "name": "Fiscal Year", @@ -266,8 +299,12 @@ "write": 0 } ], + "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_field": "name", - "sort_order": "DESC" + "sort_order": "DESC", + "track_changes": 0, + "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index fc261a5c9da..bb01103624d 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -38,7 +38,7 @@ frappe.ui.form.on("Journal Entry", { }, posting_date: function(frm) { - if(!frm.doc.multi_currency) return; + if(!frm.doc.multi_currency || !frm.doc.posting_date) return; $.each(frm.doc.accounts || [], function(i, row) { erpnext.journal_entry.set_exchange_rate(frm, row.doctype, row.name); diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.json b/erpnext/accounts/doctype/journal_entry/journal_entry.json index 112112fdb0f..deb252c0d5e 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.json +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Title", @@ -79,7 +81,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Entry Type", @@ -110,6 +113,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -140,6 +144,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -167,7 +172,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Posting Date", @@ -196,7 +202,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Company", @@ -227,6 +234,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -256,6 +264,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accounting Entries", @@ -286,6 +295,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -312,7 +322,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 0, "label": "Reference Number", @@ -342,6 +353,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reference Date", @@ -370,7 +382,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "User Remark", @@ -400,6 +413,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -425,7 +439,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Debit", @@ -455,7 +470,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Credit", @@ -487,6 +503,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Difference (Dr - Cr)", @@ -518,6 +535,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Make Difference Entry", @@ -546,6 +564,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Multi Currency", @@ -574,6 +593,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Amount Currency", @@ -603,6 +623,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Total Amount", @@ -631,6 +652,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Amount in Words", @@ -658,6 +680,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reference", @@ -685,7 +708,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Clearance Date", @@ -716,6 +740,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Remark", @@ -745,6 +770,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -771,6 +797,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Bill No", @@ -800,6 +827,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Bill Date", @@ -829,6 +857,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Due Date", @@ -859,6 +888,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off", @@ -889,6 +919,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Based On", @@ -918,6 +949,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Get Outstanding Invoices", @@ -946,6 +978,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -974,6 +1007,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Amount", @@ -1002,6 +1036,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Printing Settings", @@ -1030,6 +1065,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Pay To / Recd From", @@ -1057,6 +1093,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1084,6 +1121,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Letter Head", @@ -1112,6 +1150,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Print Heading", @@ -1142,6 +1181,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "More Information", @@ -1171,6 +1211,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1200,7 +1241,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Opening", @@ -1232,6 +1274,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Stock Entry", @@ -1261,6 +1304,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -1293,7 +1337,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2016-11-07 05:53:46.738161", + "modified": "2017-02-17 16:17:48.991851", "modified_by": "Administrator", "module": "Accounts", "name": "Journal Entry", @@ -1309,7 +1353,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1330,7 +1373,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1351,7 +1393,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1367,8 +1408,10 @@ "read_only": 0, "read_only_onload": 1, "search_fields": "voucher_type,posting_date, due_date, cheque_no", + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "title_field": "title", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index a13cc7dde20..28a746e4c4a 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -46,6 +46,9 @@ class JournalEntry(AccountsController): self.accounts = [account for account in self.accounts if not (account.debit_in_account_currency==0.0 and account.credit_in_account_currency==0.0)] + if not self.accounts: + frappe.throw("Debit or Credit amount is not found in account table") + def on_submit(self): self.check_credit_limit() self.make_gl_entries() @@ -834,7 +837,7 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi # Added posting_date as one of the parameters of get_exchange_rate @frappe.whitelist() -def get_exchange_rate(posting_date, account, account_currency=None, company=None, +def get_exchange_rate(posting_date, account=None, account_currency=None, company=None, reference_type=None, reference_name=None, debit=None, credit=None, exchange_rate=None): from erpnext.setup.utils import get_exchange_rate account_details = frappe.db.get_value("Account", account, diff --git a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json index 18fccbe2c7d..0bd6f86c261 100644 --- a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json +++ b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json @@ -9,6 +9,7 @@ "docstatus": 0, "doctype": "DocType", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, @@ -20,8 +21,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, + "in_standard_filter": 0, "label": "Account", "length": 0, "no_copy": 0, @@ -33,6 +36,7 @@ "print_hide_if_no_value": 0, "print_width": "250px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 1, @@ -51,7 +55,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Account Type", "length": 0, "no_copy": 0, @@ -60,6 +66,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -77,7 +84,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Account Balance", "length": 0, "no_copy": 1, @@ -88,6 +97,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -106,8 +116,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Cost Center", "length": 0, "no_copy": 0, @@ -119,6 +131,7 @@ "print_hide_if_no_value": 0, "print_width": "180px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -137,13 +150,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -161,7 +177,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Party Type", "length": 0, "no_copy": 0, @@ -170,6 +188,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -187,7 +206,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Party", "length": 0, "no_copy": 0, @@ -196,6 +217,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -213,7 +235,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Party Balance", "length": 0, "no_copy": 0, @@ -223,6 +247,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -242,7 +267,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Currency", "length": 0, "no_copy": 0, @@ -251,6 +278,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -268,7 +296,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Account Currency", "length": 0, "no_copy": 1, @@ -278,6 +308,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -295,7 +326,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -303,6 +336,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -320,7 +354,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Exchange Rate", "length": 0, "no_copy": 0, @@ -329,6 +365,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -346,7 +383,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Amount", "length": 0, "no_copy": 0, @@ -354,6 +393,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -371,7 +411,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Debit", "length": 0, "no_copy": 0, @@ -381,6 +423,7 @@ "print_hide": 0, "print_hide_if_no_value": 1, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -398,7 +441,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Debit in Company Currency", "length": 0, "no_copy": 1, @@ -410,6 +455,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -427,13 +473,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -451,7 +500,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Credit", "length": 0, "no_copy": 0, @@ -461,6 +512,7 @@ "print_hide": 0, "print_hide_if_no_value": 1, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -478,7 +530,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Credit in Company Currency", "length": 0, "no_copy": 1, @@ -490,6 +544,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -507,7 +562,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Reference", "length": 0, "no_copy": 0, @@ -515,6 +572,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -532,7 +590,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Reference Type", "length": 0, "no_copy": 0, @@ -542,6 +602,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -559,7 +620,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Reference Name", "length": 0, "no_copy": 0, @@ -569,6 +632,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -586,7 +650,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Project", "length": 0, "no_copy": 0, @@ -596,6 +662,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -613,13 +680,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -637,7 +707,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Is Advance", "length": 0, "no_copy": 1, @@ -648,6 +720,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -665,7 +738,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Against Account", "length": 0, "no_copy": 1, @@ -675,6 +750,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -692,7 +768,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-08-26 01:54:32.267927", + "modified": "2017-02-17 16:28:35.118357", "modified_by": "Administrator", "module": "Accounts", "name": "Journal Entry Account", @@ -701,6 +777,8 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_order": "DESC", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json index 923e87dfdc9..8b03e2e01bd 100644 --- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json +++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mode of Payment", @@ -52,6 +53,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Type", @@ -81,6 +83,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accounts", @@ -111,7 +114,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:54:39.560399", + "modified": "2017-02-17 16:31:34.207683", "modified_by": "Administrator", "module": "Accounts", "name": "Mode of Payment", @@ -127,7 +130,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -148,7 +150,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -163,6 +164,8 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_order": "ASC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 6528c8fd518..50bfbd3ea16 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -11,9 +11,8 @@ frappe.ui.form.on('Payment Entry', { }, setup: function(frm) { - var party_account_type = frm.doc.party_type=="Customer" ? "Receivable" : "Payable"; - frm.set_query("paid_from", function() { + var party_account_type = frm.doc.party_type=="Customer" ? "Receivable" : "Payable"; var account_types = in_list(["Pay", "Internal Transfer"], frm.doc.payment_type) ? ["Bank", "Cash"] : party_account_type; @@ -28,11 +27,14 @@ frappe.ui.form.on('Payment Entry', { frm.set_query("party_type", function() { return{ - query: "erpnext.setup.doctype.party_type.party_type.get_party_type" + "filters": { + "name": ["in",["Customer","Supplier"]], + } } }); frm.set_query("paid_to", function() { + var party_account_type = frm.doc.party_type=="Customer" ? "Receivable" : "Payable"; var account_types = in_list(["Receive", "Internal Transfer"], frm.doc.payment_type) ? ["Bank", "Cash"] : party_account_type; @@ -85,8 +87,13 @@ frappe.ui.form.on('Payment Entry', { frm.events.show_general_ledger(frm); }, + company: function(frm) { + frm.events.hide_unhide_fields(frm); + frm.events.set_dynamic_labels(frm); + }, + hide_unhide_fields: function(frm) { - var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency; + var company_currency = frm.doc.company? frappe.get_doc(":Company", frm.doc.company).default_currency: ""; frm.toggle_display("source_exchange_rate", (frm.doc.paid_amount && frm.doc.paid_from_account_currency != company_currency)); @@ -124,7 +131,7 @@ frappe.ui.form.on('Payment Entry', { }, set_dynamic_labels: function(frm) { - var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency; + var company_currency = frm.doc.company? frappe.get_doc(":Company", frm.doc.company).default_currency: ""; frm.set_currency_labels(["base_paid_amount", "base_received_amount", "base_total_allocated_amount", "difference_amount"], company_currency); @@ -137,6 +144,10 @@ frappe.ui.form.on('Payment Entry', { frm.set_currency_labels(["total_allocated_amount", "unallocated_amount"], party_account_currency); + var currency_field = (frm.doc.payment_type=="Receive") ? "paid_from_account_currency" : "paid_to_account_currency" + frm.set_df_property("total_allocated_amount", "options", currency_field); + frm.set_df_property("unallocated_amount", "options", currency_field); + frm.set_currency_labels(["total_amount", "outstanding_amount", "allocated_amount"], party_account_currency, "references"); @@ -747,4 +758,4 @@ frappe.ui.form.on('Payment Entry Deduction', { deductions_remove: function(frm) { frm.events.set_difference_amount(frm); } -}) \ No newline at end of file +}) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json index 98fa445c9b1..e744a3cf356 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.json +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Type of Payment", @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -79,6 +81,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Payment Type", @@ -108,6 +111,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -123,7 +127,7 @@ "search_index": 0, "set_only_once": 0, "unique": 0 - }, + }, { "allow_on_submit": 0, "bold": 1, @@ -136,6 +140,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Posting Date", @@ -164,6 +169,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -193,6 +199,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Mode of Payment", @@ -216,13 +223,14 @@ "bold": 0, "collapsible": 0, "columns": 0, - "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type", + "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)", "fieldname": "party_section", "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment From / To", @@ -245,6 +253,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "default": "", "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)", "fieldname": "party_type", "fieldtype": "Link", @@ -252,6 +261,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Party Type", @@ -282,6 +292,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Party", @@ -311,6 +322,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -340,6 +352,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Party Name", @@ -368,6 +381,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accounts", @@ -397,6 +411,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Party Balance", @@ -426,6 +441,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Account Paid From", @@ -456,6 +472,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Account Currency", @@ -486,6 +503,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Account Balance", @@ -515,6 +533,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -543,6 +562,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Account Paid To", @@ -573,6 +593,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Account Currency", @@ -603,6 +624,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Account Balance", @@ -634,6 +656,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amount", @@ -663,6 +686,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Paid Amount", @@ -693,6 +717,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Exchange Rate", @@ -722,6 +747,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Paid Amount (Company Currency)", @@ -751,6 +777,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -779,6 +806,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Received Amount", @@ -809,6 +837,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Exchange Rate", @@ -838,6 +867,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Received Amount (Company Currency)", @@ -869,6 +899,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reference", @@ -899,6 +930,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Allocate Payment Amount", @@ -928,6 +960,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment References", @@ -958,6 +991,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Writeoff", @@ -987,6 +1021,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Allocated Amount", @@ -1016,6 +1051,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Allocated Amount (Company Currency)", @@ -1045,6 +1081,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Set Exchange Gain / Loss", @@ -1073,6 +1110,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1101,6 +1139,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Unallocated Amount", @@ -1130,6 +1169,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Difference Amount (Company Currency)", @@ -1160,6 +1200,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Difference Amount", @@ -1190,6 +1231,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Deductions or Loss", @@ -1218,6 +1260,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment Deductions or Loss", @@ -1247,6 +1290,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Transaction ID", @@ -1276,6 +1320,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Cheque/Reference No", @@ -1304,6 +1349,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1332,6 +1378,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Cheque/Reference Date", @@ -1361,6 +1408,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Clearance Date", @@ -1391,6 +1439,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "More Information", @@ -1420,6 +1469,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Project", @@ -1449,6 +1499,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Remarks", @@ -1477,6 +1528,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1504,6 +1556,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Letter Head", @@ -1533,6 +1586,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Print Heading", @@ -1562,6 +1616,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -1590,6 +1645,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Title", @@ -1618,7 +1674,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-01-30 00:41:51.348616", + "modified": "2017-02-17 16:15:52.917533", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry", @@ -1669,6 +1725,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "title_field": "title", diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json index 437d6951660..8104e9b3fc6 100644 --- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json +++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json @@ -9,6 +9,7 @@ "doctype": "DocType", "document_type": "", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, @@ -21,7 +22,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Type", "length": 0, "no_copy": 0, @@ -49,7 +52,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, + "in_standard_filter": 0, "label": "Name", "length": 0, "no_copy": 0, @@ -77,7 +82,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Due Date", "length": 0, "no_copy": 0, @@ -104,7 +111,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -130,7 +139,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Total Amount", "length": 0, "no_copy": 0, @@ -157,7 +168,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Outstanding", "length": 0, "no_copy": 0, @@ -184,7 +197,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Allocated", "length": 0, "no_copy": 0, @@ -211,7 +226,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Exchange Rate", "length": 0, "no_copy": 0, @@ -238,7 +255,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-11-14 12:28:51.822341", + "modified": "2017-02-17 16:47:17.156256", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry Reference", @@ -248,7 +265,9 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json index e6a3131449c..c1580f6ef2c 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.json +++ b/erpnext/accounts/doctype/payment_request/payment_request.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -52,6 +53,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Recipient Message And Payment Details", @@ -81,6 +83,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Print Format", @@ -110,6 +113,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "To", @@ -138,6 +142,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Subject", @@ -166,6 +171,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -193,6 +199,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment Gateway Account", @@ -222,6 +229,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Transaction Currency", @@ -252,6 +260,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amount", @@ -282,6 +291,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Status", @@ -312,6 +322,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Make Sales Invoice", @@ -340,6 +351,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -362,11 +374,12 @@ "collapsible": 0, "columns": 0, "fieldname": "message", - "fieldtype": "Small Text", + "fieldtype": "Text", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Message", @@ -395,12 +408,13 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Message Examples", "length": 0, "no_copy": 0, - "options": "
Message Example
\n\n<p> Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.</p>\n\n<p> Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.</p>\n\n<p> We don't want you to be spending time running around in order to pay for your Bill.
After all, life is beautiful and the time you have in hand should be spent to enjoy it!
So here are our little ways to help you get more time for life! </p>\n\n<a href=\"{{ payment_url }}\"> click here to pay </a>\n\n
\n", + "options": "
Message Example
\n\n<p>Dear {{ doc.contact_person }},</p>\n\n<p>Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.</p>\n\n<a href=\"{{ payment_url }}\"> click here to pay </a>\n\n
\n", "permlevel": 0, "precision": "", "print_hide": 0, @@ -424,6 +438,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mute Email", @@ -452,6 +467,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "payment_url", @@ -481,6 +497,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment Gateway Details", @@ -509,6 +526,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment Gateway", @@ -538,6 +556,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment Account", @@ -567,6 +586,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reference Details", @@ -595,6 +615,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Reference Doctype", @@ -624,6 +645,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 1, "label": "Reference Name", @@ -653,6 +675,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -675,13 +698,13 @@ "hide_toolbar": 0, "idx": 0, "image_view": 0, - "in_create": 1, + "in_create": 0, "in_dialog": 0, "is_submittable": 1, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-12-15 14:46:19.662816", + "modified": "2017-02-23 05:03:37.464863", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Request", @@ -698,7 +721,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -719,7 +741,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -734,7 +755,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 26663fd5704..99deb3fd96f 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -26,7 +26,7 @@ class PaymentRequest(Document): ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name) if self.payment_account and ref_doc.currency != frappe.db.get_value("Account", self.payment_account, "account_currency"): frappe.throw(_("Transaction currency must be same as Payment Gateway currency")) - + def on_submit(self): send_mail = True self.make_communication_entry() @@ -54,20 +54,20 @@ class PaymentRequest(Document): def set_payment_request_url(self): if self.payment_account: self.payment_url = self.get_payment_url() - + if self.payment_url: self.db_set('payment_url', self.payment_url) - + if self.payment_url or not self.payment_gateway_account: self.db_set('status', 'Initiated') - + def get_payment_url(self): data = frappe.db.get_value(self.reference_doctype, self.reference_name, ["company", "customer_name"], as_dict=1) - + controller = get_integration_controller(self.payment_gateway) controller.validate_transaction_currency(self.currency) - + return controller.get_payment_url(**{ "amount": self.grand_total, "title": data.company, @@ -83,7 +83,7 @@ class PaymentRequest(Document): def set_as_paid(self): if frappe.session.user == "Guest": frappe.set_user("Administrator") - + payment_entry = self.create_payment_entry() self.make_invoice() @@ -157,7 +157,7 @@ class PaymentRequest(Document): def set_as_cancelled(self): self.db_set("status", "Cancelled") - + def check_if_payment_entry_exists(self): if self.status == "Paid": payment_entry = frappe.db.sql_list("""select parent from `tabPayment Entry Reference` @@ -179,11 +179,11 @@ class PaymentRequest(Document): def get_payment_success_url(self): return self.payment_success_url - + def on_payment_authorized(self, status=None): if not status: return - + shopping_cart_settings = frappe.get_doc("Shopping Cart Settings") if status in ["Authorized", "Completed"]: @@ -203,9 +203,9 @@ class PaymentRequest(Document): }).get(success_url, "me") else: redirect_to = get_url("/orders/{0}".format(self.reference_name)) - + return redirect_to - + @frappe.whitelist(allow_guest=True) def make_payment_request(**args): """Make payment request""" @@ -234,7 +234,7 @@ def make_payment_request(**args): "grand_total": grand_total, "email_to": args.recipient_id or "", "subject": "Payment Request for %s"%args.dn, - "message": gateway_account.get("message") or get_dummy_message(args.use_dummy_message), + "message": gateway_account.get("message") or get_dummy_message(ref_doc), "reference_doctype": args.dt, "reference_name": args.dn }) @@ -319,19 +319,24 @@ def make_status_as_paid(doc, method): payment_request_name = frappe.db.get_value("Payment Request", {"reference_doctype": ref.reference_doctype, "reference_name": ref.reference_name, "docstatus": 1}) - + if payment_request_name: doc = frappe.get_doc("Payment Request", payment_request_name) if doc.status != "Paid": doc.db_set('status', 'Paid') frappe.db.commit() -def get_dummy_message(use_dummy_message=True): - return """ -

Hope you are enjoying a service. Please consider bank details for payment

-

Bank Details


-

Bank Name : National Bank

-

Account Number : 123456789000872

-

IFSC code : NB000001

-

Account Name : Wind Power LLC

- """ +def get_dummy_message(doc): + return frappe.render_template("""{% if doc.contact_person -%} +

Dear {{ doc.contact_person }},

+{%- else %}

Hello,

{% endif %} + +

{{ _("Requesting payment against {0} {1} for amount {2}").format(doc.doctype, + doc.name, doc.get_formatted("grand_total")) }}

+ +{{ _("Make Payment") }} + +

{{ _("If you have any questions, please get back to us.") }}

+ +

{{ _("Thank you for your business!") }}

+""", dict(doc=doc, payment_url = '{{ payment_url }}')) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.js b/erpnext/accounts/doctype/pricing_rule/pricing_rule.js index 5a3e651b24e..03bb7aef5ad 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.js +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.js @@ -91,8 +91,8 @@ cur_frm.cscript.buying = function() { } //Dynamically change the description based on type of margin -cur_frm.cscript.type = function(doc){ - cur_frm.set_df_property('rate', 'description', doc.type=='Percentage'?'In Percentage %':'In Amount') +cur_frm.cscript.margin_type = function(doc){ + cur_frm.set_df_property('margin_rate_or_amount', 'description', doc.margin_type=='Percentage'?'In Percentage %':'In Amount') } frappe.ui.form.on('Pricing Rule', 'price_or_discount', function(frm){ @@ -112,4 +112,4 @@ frappe.ui.form.on('Pricing Rule', { } } } -}) \ No newline at end of file +}) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json index fdf3db92fb0..49af59b3880 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -49,6 +50,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Title", @@ -78,6 +80,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Apply On", @@ -107,6 +110,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Item Code", @@ -136,6 +140,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Brand", @@ -165,6 +170,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Item Group", @@ -193,6 +199,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -221,6 +228,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Priority", @@ -249,6 +257,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Disable", @@ -276,6 +285,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -303,6 +313,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Selling", @@ -330,6 +341,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Buying", @@ -357,6 +369,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -385,6 +398,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Applicable For", @@ -414,6 +428,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer", @@ -443,6 +458,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Group", @@ -472,6 +488,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Territory", @@ -501,6 +518,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Partner", @@ -530,6 +548,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Campaign", @@ -559,6 +578,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier", @@ -588,6 +608,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier Type", @@ -616,6 +637,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -643,6 +665,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Min Qty", @@ -670,6 +693,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -697,6 +721,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Max Qty", @@ -724,6 +749,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -752,6 +778,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Valid From", @@ -779,6 +806,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Valid Upto", @@ -806,6 +834,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -832,6 +861,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -861,6 +891,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Margin", @@ -890,6 +921,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Margin Type", @@ -919,6 +951,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -948,6 +981,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Margin Rate or Amount", @@ -976,6 +1010,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -1004,6 +1039,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price or Discount", @@ -1032,6 +1068,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1059,6 +1096,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price", @@ -1087,6 +1125,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Discount on Price List Rate (%)", @@ -1115,6 +1154,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "For Price List", @@ -1143,6 +1183,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -1171,6 +1212,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Pricing Rule Help", @@ -1199,7 +1241,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:19:31.478456", + "modified": "2017-02-17 16:21:28.446208", "modified_by": "Administrator", "module": "Accounts", "name": "Pricing Rule", @@ -1215,7 +1257,6 @@ "export": 1, "if_owner": 0, "import": 1, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -1236,7 +1277,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -1257,7 +1297,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -1278,7 +1317,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -1299,7 +1337,6 @@ "export": 1, "if_owner": 0, "import": 1, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -1314,8 +1351,10 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "title_field": "", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 3c622972c4c..c5d2b3114ba 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -123,12 +123,13 @@ def apply_pricing_rule(args): def get_serial_no_for_item(args): from erpnext.stock.get_item_details import get_serial_no + item_details = frappe._dict({ "doctype": args.doctype, "name": args.name, "serial_no": args.serial_no }) - if args.get("parenttype") in ("Sales Invoice", "Delivery Note"): + if args.get("parenttype") in ("Sales Invoice", "Delivery Note") and args.qty > 0: item_details.serial_no = get_serial_no(args) return item_details diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index c322370f639..55ece1c35f4 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -324,6 +324,12 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){ } frappe.ui.form.on("Purchase Invoice", { + setup: function(frm) { + frm.custom_make_buttons = { + 'Purchase Invoice': 'Debit Note', + 'Payment Entry': 'Payment' + } + }, onload: function(frm) { $.each(["warehouse", "rejected_warehouse"], function(i, field) { frm.set_query(field, "items", function() { diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index dfc31184ba5..ff3a1686e3f 100755 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Title", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -81,6 +83,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Supplier", @@ -112,6 +115,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier Name", @@ -141,7 +145,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier Invoice No", @@ -171,6 +176,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Paid", @@ -200,6 +206,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Return", @@ -228,6 +235,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -256,7 +264,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Date", @@ -285,7 +294,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Due Date", @@ -314,7 +324,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier Invoice Date", @@ -344,6 +355,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -373,7 +385,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Company", @@ -403,6 +416,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Return Against Purchase Invoice", @@ -432,6 +446,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address and Contact", @@ -459,7 +474,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Select Supplier Address", @@ -487,7 +503,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Person", @@ -517,6 +534,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address", @@ -544,6 +562,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact", @@ -571,6 +590,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mobile No", @@ -598,6 +618,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Email", @@ -625,6 +646,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -653,6 +675,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Select Shipping Address", @@ -682,6 +705,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Shipping Address", @@ -710,6 +734,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Currency and Price List", @@ -738,6 +763,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Currency", @@ -769,6 +795,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Exchange Rate", @@ -799,6 +826,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -825,6 +853,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List", @@ -853,6 +882,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List Currency", @@ -881,6 +911,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List Exchange Rate", @@ -909,6 +940,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Ignore Pricing Rule", @@ -936,6 +968,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -966,6 +999,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Update Stock", @@ -994,6 +1028,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Items", @@ -1024,6 +1059,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1050,6 +1086,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total (Company Currency)", @@ -1080,6 +1117,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Total (Company Currency)", @@ -1110,6 +1148,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1136,6 +1175,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total", @@ -1165,6 +1205,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Total", @@ -1195,6 +1236,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -1224,6 +1266,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Taxes and Charges", @@ -1254,6 +1297,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Purchase Taxes and Charges", @@ -1284,6 +1328,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Taxes and Charges Calculation", @@ -1312,6 +1357,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -1341,6 +1387,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Taxes and Charges Added (Company Currency)", @@ -1371,6 +1418,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Taxes and Charges Deducted (Company Currency)", @@ -1401,6 +1449,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Taxes and Charges (Company Currency)", @@ -1431,6 +1480,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1458,6 +1508,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Taxes and Charges Added", @@ -1488,6 +1539,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Taxes and Charges Deducted", @@ -1518,6 +1570,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Taxes and Charges", @@ -1548,6 +1601,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Additional Discount", @@ -1577,6 +1631,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Apply Additional Discount On", @@ -1606,6 +1661,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Additional Discount Amount (Company Currency)", @@ -1635,6 +1691,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1662,6 +1719,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Additional Discount Percentage", @@ -1690,6 +1748,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Additional Discount Amount", @@ -1719,6 +1778,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1746,6 +1806,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Grand Total (Company Currency)", @@ -1777,6 +1838,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "In Words (Company Currency)", @@ -1806,6 +1868,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1834,6 +1897,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Grand Total", @@ -1864,6 +1928,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "In Words", @@ -1893,6 +1958,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Advance", @@ -1922,7 +1988,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Outstanding Amount", @@ -1955,6 +2022,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payments", @@ -1983,6 +2051,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mode of Payment", @@ -2012,6 +2081,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Cash/Bank Account", @@ -2041,6 +2111,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -2069,6 +2140,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Paid Amount", @@ -2098,6 +2170,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Paid Amount (Company Currency)", @@ -2129,6 +2202,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off", @@ -2157,6 +2231,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Amount", @@ -2185,6 +2260,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Amount (Company Currency)", @@ -2214,6 +2290,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -2242,6 +2319,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Account", @@ -2271,6 +2349,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Cost Center", @@ -2300,6 +2379,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Advance Payments", @@ -2329,6 +2409,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Get Advances Paid", @@ -2358,6 +2439,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Advances", @@ -2389,6 +2471,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Terms and Conditions", @@ -2417,6 +2500,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Terms", @@ -2445,6 +2529,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Terms and Conditions1", @@ -2472,6 +2557,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Raw Materials Supplied", @@ -2501,6 +2587,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Raw Materials Supplied", @@ -2530,6 +2617,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier Warehouse", @@ -2561,6 +2649,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplied Items", @@ -2590,6 +2679,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Printing Settings", @@ -2618,6 +2708,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Letter Head", @@ -2647,6 +2738,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Print Heading", @@ -2677,6 +2769,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Print Language", @@ -2705,6 +2798,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "More Information", @@ -2734,7 +2828,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Credit To", @@ -2765,6 +2860,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Party Account Currency", @@ -2795,7 +2891,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Opening", @@ -2826,6 +2923,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Against Expense Account", @@ -2855,6 +2953,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -2882,7 +2981,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Status", "length": 0, "no_copy": 0, @@ -2910,6 +3011,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Posting Time", @@ -2940,6 +3042,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Remarks", @@ -2970,6 +3073,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rejected Warehouse", @@ -2994,13 +3098,14 @@ "collapsible": 1, "collapsible_depends_on": "is_recurring", "columns": 0, - "depends_on": "eval:doc.docstatus<2", + "depends_on": "eval:doc.docstatus<2 && !doc.__islocal", "fieldname": "recurring_invoice", "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Recurring Invoice", @@ -3031,6 +3136,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Recurring", @@ -3060,6 +3166,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Recurring Type", @@ -3090,6 +3197,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "From Date", @@ -3119,6 +3227,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "To Date", @@ -3147,6 +3256,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Submit on creation", @@ -3177,6 +3287,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Notify by email", @@ -3207,6 +3318,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Repeat on Day of Month", @@ -3236,6 +3348,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "End Date", @@ -3263,6 +3376,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -3292,6 +3406,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Next Date", @@ -3321,6 +3436,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Recurring Id", @@ -3350,6 +3466,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Notification Email Address", @@ -3378,6 +3495,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Recurring Print Format", @@ -3409,7 +3527,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2016-11-09 14:18:47.094777", + "modified": "2017-02-22 18:16:09.890488", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", @@ -3425,7 +3543,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -3446,7 +3563,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -3467,7 +3583,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -3488,7 +3603,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -3509,7 +3623,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -3525,9 +3638,11 @@ "read_only": 0, "read_only_onload": 1, "search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "supplier", "title_field": "title", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index d8c9b04800a..dffe72eac3a 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -19,6 +19,7 @@ test_ignore = ["Serial No"] class TestPurchaseInvoice(unittest.TestCase): def setUp(self): unlink_payment_on_cancel_of_invoice() + frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1) def tearDown(self): unlink_payment_on_cancel_of_invoice(0) diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json index 6f8e219f88e..6102d3ea301 100755 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json @@ -21,7 +21,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Item", @@ -52,6 +53,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -78,6 +80,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Item Name", @@ -107,6 +110,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Description", @@ -135,6 +139,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Description", @@ -166,6 +171,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Image", @@ -194,6 +200,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Image View", @@ -223,6 +230,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Quantity and Rate", @@ -250,6 +258,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Received Qty", @@ -278,6 +287,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Qty", @@ -307,6 +317,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rejected Qty", @@ -335,6 +346,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -361,6 +373,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "UOM", @@ -389,6 +402,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Conversion Factor", @@ -416,6 +430,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -442,6 +457,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List Rate", @@ -471,6 +487,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Discount on Price List Rate (%)", @@ -498,6 +515,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -524,6 +542,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List Rate (Company Currency)", @@ -552,6 +571,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -578,6 +598,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Rate ", @@ -608,6 +629,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Amount", @@ -638,6 +660,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -664,6 +687,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rate (Company Currency)", @@ -694,6 +718,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amount (Company Currency)", @@ -724,6 +749,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Pricing Rule", @@ -752,6 +778,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -779,6 +806,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Rate", @@ -808,6 +836,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Amount", @@ -837,6 +866,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -864,6 +894,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Rate (Company Currency)", @@ -893,6 +924,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Amount (Company Currency)", @@ -922,6 +954,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Warehouse", @@ -951,6 +984,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accepted Warehouse", @@ -980,6 +1014,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rejected Warehouse", @@ -1010,6 +1045,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Quality Inspection", @@ -1039,6 +1075,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Batch No", @@ -1068,6 +1105,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -1096,6 +1134,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Serial No", @@ -1124,6 +1163,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rejected Serial No", @@ -1152,6 +1192,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accounting", @@ -1179,6 +1220,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Expense Head", @@ -1211,6 +1253,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1236,7 +1279,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Project", @@ -1267,6 +1311,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Cost Center", @@ -1299,6 +1344,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reference", @@ -1315,6 +1361,35 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "is_sample_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Is Sample Item", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -1326,6 +1401,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Brand", @@ -1355,7 +1431,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Item Group", @@ -1387,6 +1464,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Item Tax Rate", @@ -1416,6 +1494,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Item Tax Amount", @@ -1445,7 +1524,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Purchase Order", @@ -1476,6 +1556,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "BOM", @@ -1505,6 +1586,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1531,6 +1613,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Fixed Asset", @@ -1560,6 +1643,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Asset", @@ -1588,7 +1672,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Purchase Order Item", @@ -1617,7 +1702,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Purchase Receipt", @@ -1648,6 +1734,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Page Break", @@ -1674,7 +1761,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "PR Detail", @@ -1704,6 +1792,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Valuation Rate", @@ -1732,6 +1821,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Raw Materials Supplied Cost", @@ -1760,6 +1850,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Landed Cost Voucher Amount", @@ -1788,7 +1879,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-11-16 16:04:52.465169", + "modified": "2017-02-17 16:28:26.719053", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Item", @@ -1797,7 +1888,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 6268fe3af3f..1564b48c68e 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -469,6 +469,12 @@ cur_frm.set_query("asset", "items", function(doc, cdt, cdn) { frappe.ui.form.on('Sales Invoice', { setup: function(frm){ + frm.custom_make_buttons = { + 'Delivery Note': 'Delivery', + 'Sales Invoice': 'Sales Return', + 'Payment Request': 'Payment Request', + 'Payment': 'Payment Entry' + }, frm.fields_dict["timesheets"].grid.get_field("time_sheet").get_query = function(doc, cdt, cdn){ return{ query: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index f026cb06fa2..ae8fd8aff1c 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -6,7 +6,7 @@ "beta": 0, "creation": "2013-05-24 19:29:05", "custom": 0, - "default_print_format": "Standard", + "default_print_format": "Sample Print", "docstatus": 0, "doctype": "DocType", "document_type": "", @@ -23,12 +23,13 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", "length": 0, "no_copy": 0, - "options": "icon-user", + "options": "fa fa-user", "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, @@ -52,6 +53,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Title", @@ -80,6 +82,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -110,6 +113,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Customer", @@ -141,6 +145,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Name", @@ -170,6 +175,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is POS", @@ -200,6 +206,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Return", @@ -228,11 +235,12 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Offline POS Name", "length": 0, - "no_copy": 1, + "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, @@ -256,6 +264,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -283,7 +292,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Date", @@ -312,7 +322,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment Due Date", @@ -341,7 +352,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -371,7 +383,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Project", @@ -402,6 +415,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -433,6 +447,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Return Against Sales Invoice", @@ -463,6 +478,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address and Contact", @@ -491,6 +507,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Address", @@ -519,6 +536,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address", @@ -546,6 +564,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Person", @@ -574,6 +593,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact", @@ -601,6 +621,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mobile No", @@ -628,6 +649,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Email", @@ -656,6 +678,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -682,7 +705,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Shipping Address Name", @@ -712,6 +736,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Shipping Address", @@ -740,7 +765,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Group", @@ -769,6 +795,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Territory", @@ -777,7 +804,7 @@ "options": "Territory", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -799,6 +826,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Currency and Price List", @@ -827,6 +855,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Currency", @@ -858,6 +887,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Exchange Rate", @@ -888,6 +918,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -915,6 +946,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List", @@ -945,6 +977,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List Currency", @@ -974,6 +1007,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List Exchange Rate", @@ -1002,6 +1036,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Ignore Pricing Rule", @@ -1029,13 +1064,14 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", "length": 0, "no_copy": 0, "oldfieldtype": "Section Break", - "options": "icon-shopping-cart", + "options": "fa fa-shopping-cart", "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, @@ -1058,6 +1094,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Update Stock", @@ -1087,6 +1124,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Items", @@ -1117,12 +1155,13 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Packing List", "length": 0, "no_copy": 0, - "options": "icon-suitcase", + "options": "fa fa-suitcase", "permlevel": 0, "print_hide": 1, "print_hide_if_no_value": 0, @@ -1145,6 +1184,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Packed Items", @@ -1173,6 +1213,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Product Bundle Help", @@ -1202,6 +1243,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Time Sheet List", @@ -1230,6 +1272,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Time Sheets", @@ -1260,6 +1303,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Billing Amount", @@ -1288,6 +1332,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1314,6 +1359,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total (Company Currency)", @@ -1343,6 +1389,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Total (Company Currency)", @@ -1373,6 +1420,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1399,6 +1447,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Total", @@ -1427,6 +1476,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total", @@ -1456,13 +1506,14 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", "length": 0, "no_copy": 0, "oldfieldtype": "Section Break", - "options": "icon-money", + "options": "fa fa-money", "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, @@ -1485,6 +1536,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Taxes and Charges", @@ -1515,6 +1567,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1541,6 +1594,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Shipping Rule", @@ -1570,6 +1624,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1596,6 +1651,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Taxes and Charges", @@ -1626,6 +1682,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Taxes and Charges Calculation", @@ -1654,6 +1711,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1680,6 +1738,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Taxes and Charges (Company Currency)", @@ -1710,6 +1769,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1737,6 +1797,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Taxes and Charges", @@ -1766,6 +1827,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Additional Discount", @@ -1795,6 +1857,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Apply Additional Discount On", @@ -1824,6 +1887,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Additional Discount Amount (Company Currency)", @@ -1853,6 +1917,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1879,6 +1944,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Additional Discount Percentage", @@ -1907,6 +1973,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Additional Discount Amount", @@ -1935,13 +2002,14 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", "length": 0, "no_copy": 0, "oldfieldtype": "Section Break", - "options": "icon-money", + "options": "fa fa-money", "permlevel": 0, "print_hide": 1, "print_hide_if_no_value": 0, @@ -1963,7 +2031,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Grand Total (Company Currency)", @@ -1994,6 +2063,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rounded Total (Company Currency)", @@ -2025,6 +2095,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "In Words (Company Currency)", @@ -2054,6 +2125,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -2082,6 +2154,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Grand Total", @@ -2112,6 +2185,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rounded Total", @@ -2142,6 +2216,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "In Words", @@ -2171,6 +2246,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Advance", @@ -2201,6 +2277,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Outstanding Amount", @@ -2232,13 +2309,14 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Advance Payments", "length": 0, "no_copy": 0, "oldfieldtype": "Section Break", - "options": "icon-money", + "options": "fa fa-money", "permlevel": 0, "print_hide": 1, "print_hide_if_no_value": 0, @@ -2261,6 +2339,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Get Advances Received", @@ -2290,6 +2369,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Advances", @@ -2322,12 +2402,13 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payments", "length": 0, "no_copy": 0, - "options": "icon-money", + "options": "fa fa-money", "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, @@ -2351,6 +2432,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Cash/Bank Account", @@ -2381,6 +2463,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Invoice Payment", @@ -2410,6 +2493,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -2437,6 +2521,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Paid Amount (Company Currency)", @@ -2466,6 +2551,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -2494,6 +2580,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Paid Amount", @@ -2524,6 +2611,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -2551,6 +2639,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Base Change Amount (Company Currency)", @@ -2580,6 +2669,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -2607,6 +2697,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Change Amount", @@ -2636,6 +2727,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Account for Change Amount", @@ -2667,6 +2759,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off", @@ -2696,6 +2789,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Amount", @@ -2724,6 +2818,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Amount (Company Currency)", @@ -2754,6 +2849,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Outstanding Amount", @@ -2782,6 +2878,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -2810,6 +2907,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Account", @@ -2839,6 +2937,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Write Off Cost Center", @@ -2868,6 +2967,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Terms", @@ -2897,6 +2997,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Terms", @@ -2927,6 +3028,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Terms and Conditions Details", @@ -2956,6 +3058,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Printing Settings", @@ -2984,6 +3087,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Letter Head", @@ -3014,6 +3118,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Print Language", @@ -3042,6 +3147,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -3069,6 +3175,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Print Heading", @@ -3100,6 +3207,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "More Information", @@ -3129,6 +3237,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Campaign", @@ -3159,6 +3268,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -3186,7 +3296,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Status", @@ -3216,6 +3327,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Source", @@ -3246,13 +3358,14 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accounting Details", "length": 0, "no_copy": 0, "oldfieldtype": "Section Break", - "options": "icon-file-text", + "options": "fa fa-file-text", "permlevel": 0, "print_hide": 1, "print_hide_if_no_value": 0, @@ -3275,7 +3388,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Debit To", @@ -3306,6 +3420,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Party Account Currency", @@ -3336,7 +3451,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Opening Entry", @@ -3367,6 +3483,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "C-Form Applicable", @@ -3395,6 +3512,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "C-Form No", @@ -3423,6 +3541,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -3450,6 +3569,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Posting Time", @@ -3479,6 +3599,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Remarks", @@ -3509,13 +3630,14 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Commission", "length": 0, "no_copy": 0, "oldfieldtype": "Section Break", - "options": "icon-group", + "options": "fa fa-group", "permlevel": 0, "print_hide": 1, "print_hide_if_no_value": 0, @@ -3537,7 +3659,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Partner", @@ -3568,6 +3691,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -3596,6 +3720,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Commission Rate (%)", @@ -3625,6 +3750,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Commission", @@ -3656,6 +3782,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Team", @@ -3683,6 +3810,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Team1", @@ -3708,19 +3836,20 @@ "collapsible": 1, "collapsible_depends_on": "is_recurring", "columns": 0, - "depends_on": "eval:doc.docstatus<2", + "depends_on": "eval:doc.docstatus<2 && !doc.__islocal", "fieldname": "recurring_invoice", "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Recurring", + "label": "Recurring Invoice", "length": 0, "no_copy": 0, - "options": "icon-time", + "options": "fa fa-time", "permlevel": 0, "print_hide": 1, "print_hide_if_no_value": 0, @@ -3743,6 +3872,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Settings", @@ -3773,6 +3903,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Recurring", @@ -3802,6 +3933,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reference Document", @@ -3832,6 +3964,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Frequency", @@ -3862,6 +3995,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Repeat on Day of Month", @@ -3891,6 +4025,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "End Date", @@ -3919,6 +4054,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Submit on creation", @@ -3949,6 +4085,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Notify by email", @@ -3979,6 +4116,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Notification Email Address", @@ -4008,6 +4146,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Recurring Print Format", @@ -4037,6 +4176,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "This Document", @@ -4067,6 +4207,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "From Date", @@ -4096,6 +4237,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "To Date", @@ -4125,6 +4267,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Next Date", @@ -4152,6 +4295,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Against Income Account", @@ -4173,7 +4317,7 @@ ], "hide_heading": 0, "hide_toolbar": 0, - "icon": "icon-file-text", + "icon": "fa fa-file-text", "idx": 181, "image_view": 0, "in_create": 0, @@ -4183,7 +4327,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-01-18 13:21:13.226318", + "modified": "2017-02-22 18:20:35.085909", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", @@ -4199,7 +4343,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -4220,7 +4363,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -4241,7 +4383,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -4262,7 +4403,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -4278,10 +4418,11 @@ "read_only": 0, "read_only_onload": 1, "search_fields": "posting_date, due_date, customer, base_grand_total, outstanding_amount", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "customer", "title_field": "title", - "track_changes": 1, + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json index 944230b1d00..42190533c31 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Barcode", @@ -48,7 +49,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Item", @@ -79,6 +81,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -105,6 +108,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Item Name", @@ -134,6 +138,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer's Item Code", @@ -161,6 +166,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Edit Description", @@ -189,6 +195,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Description", @@ -220,6 +227,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -247,6 +255,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Image View", @@ -276,6 +285,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Image", @@ -304,6 +314,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -331,6 +342,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Quantity", @@ -360,6 +372,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List Rate", @@ -390,6 +403,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -416,6 +430,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "UOM", @@ -444,6 +459,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List Rate (Company Currency)", @@ -474,6 +490,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Discount and Margin", @@ -503,6 +520,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Discount on Price List Rate (%)", @@ -532,6 +550,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -560,6 +579,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Margin Type", @@ -590,6 +610,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Margin Rate or Amount", @@ -619,6 +640,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Margin", @@ -647,6 +669,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -673,6 +696,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Rate", @@ -703,6 +727,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Amount", @@ -733,6 +758,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -759,6 +785,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rate (Company Currency)", @@ -789,6 +816,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amount (Company Currency)", @@ -819,6 +847,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Pricing Rule", @@ -847,6 +876,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -874,6 +904,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Rate", @@ -903,6 +934,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Amount", @@ -932,6 +964,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -959,6 +992,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Rate (Company Currency)", @@ -988,6 +1022,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Amount (Company Currency)", @@ -1018,6 +1053,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Drop Ship", @@ -1046,6 +1082,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Delivered By Supplier", @@ -1074,6 +1111,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accounting Details", @@ -1100,7 +1138,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Income Account", @@ -1132,7 +1171,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Expense Account", @@ -1162,6 +1202,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1188,7 +1229,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Cost Center", @@ -1222,6 +1264,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Stock Details", @@ -1249,6 +1292,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Warehouse", @@ -1279,6 +1323,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Warehouse (Optional)", @@ -1309,6 +1354,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Quality Inspection", @@ -1338,6 +1384,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Batch No", @@ -1366,6 +1413,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1381,6 +1429,35 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "is_sample_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Is Sample Item", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -1391,7 +1468,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Serial No", @@ -1421,7 +1499,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Item Group", @@ -1451,7 +1530,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Brand Name", @@ -1481,6 +1561,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Item Tax Rate", @@ -1510,6 +1591,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Available Batch Qty at Warehouse", @@ -1540,6 +1622,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Available Qty at Warehouse", @@ -1569,6 +1652,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "References", @@ -1596,7 +1680,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Order", @@ -1626,7 +1711,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Order Item", @@ -1656,6 +1742,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1682,7 +1769,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Delivery Note", @@ -1712,7 +1800,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Delivery Note Item", @@ -1742,6 +1831,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Delivered Qty", @@ -1771,6 +1861,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Fixed Asset", @@ -1799,6 +1890,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Asset", @@ -1828,6 +1920,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1855,6 +1948,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Page Break", @@ -1882,7 +1976,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-11-16 16:04:02.438952", + "modified": "2017-02-17 16:28:57.719409", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Item", @@ -1891,7 +1985,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json b/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json index 1191ea71539..a0a63121a0a 100644 --- a/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json +++ b/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json @@ -9,6 +9,7 @@ "doctype": "DocType", "document_type": "", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, @@ -21,7 +22,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, + "in_standard_filter": 0, "label": "Time Sheet", "length": 0, "no_copy": 0, @@ -31,6 +34,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -48,7 +52,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Billing Hours", "length": 0, "no_copy": 0, @@ -57,6 +63,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -74,7 +81,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Billing Amount", "length": 0, "no_copy": 0, @@ -83,6 +92,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -100,7 +110,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Timesheet Detail", "length": 0, "no_copy": 1, @@ -109,6 +121,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -126,7 +139,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-09-09 14:01:04.095775", + "modified": "2017-02-17 16:47:04.413420", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Timesheet", @@ -136,7 +149,9 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.json b/erpnext/accounts/doctype/tax_rule/tax_rule.json index df7d872f2ed..a746dafa04a 100644 --- a/erpnext/accounts/doctype/tax_rule/tax_rule.json +++ b/erpnext/accounts/doctype/tax_rule/tax_rule.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Tax Type", @@ -52,6 +53,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Use for Shopping Cart", @@ -80,6 +82,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -108,6 +111,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Tax Template", @@ -138,6 +142,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Purchase Tax Template", @@ -167,6 +172,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Filters", @@ -196,6 +202,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer", @@ -226,6 +233,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier", @@ -255,6 +263,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Billing City", @@ -283,6 +292,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Billing County", @@ -311,6 +321,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Billing State", @@ -339,6 +350,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Billing Country", @@ -368,6 +380,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -396,6 +409,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Group", @@ -426,6 +440,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier Type", @@ -455,6 +470,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Shipping City", @@ -483,6 +499,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Shipping County", @@ -511,6 +528,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Shipping State", @@ -539,6 +557,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Shipping Country", @@ -568,6 +587,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Validity", @@ -596,6 +616,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "From Date", @@ -624,6 +645,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -651,6 +673,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "To Date", @@ -679,6 +702,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -707,6 +731,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Priority", @@ -735,6 +760,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -762,6 +788,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -791,7 +818,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-12-13 15:56:28.704122", + "modified": "2017-02-17 16:22:42.501765", "modified_by": "Administrator", "module": "Accounts", "name": "Tax Rule", @@ -808,7 +835,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -823,7 +849,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 -} +} \ No newline at end of file diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index a8d166eef11..8aedf78fefc 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -7,7 +7,7 @@ import frappe import datetime from frappe import _, msgprint, scrub from frappe.defaults import get_user_permissions -from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, add_years +from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, add_years, get_timestamp from frappe.geo.doctype.address.address import get_address_display, get_default_address from frappe.email.doctype.contact.contact import get_contact_details, get_default_contact from erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency @@ -353,8 +353,17 @@ def validate_party_frozen_disabled(party_type, party_name): def get_timeline_data(doctype, name): '''returns timeline data for the past one year''' from frappe.desk.form.load import get_communication_data + + out = {} data = get_communication_data(doctype, name, - fields = 'unix_timestamp(date(creation)), count(name)', - after = add_years(None, -1).strftime('%Y-%m-%d'), limit = 366, + fields = 'date(creation), count(name)', + after = add_years(None, -1).strftime('%Y-%m-%d'), group_by='group by date(creation)', as_dict=False) - return dict(data) \ No newline at end of file + + timeline_items = dict(data) + + for date, count in timeline_items.iteritems(): + timestamp = get_timestamp(date) + out.update({ timestamp: count }) + + return out \ No newline at end of file diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index 5ff8e3e2283..7e57dce67a7 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -8,7 +8,7 @@ from frappe.utils import flt, cint from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data) def execute(filters=None): - period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity) + period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity, filters.company) asset = get_data(filters.company, "Asset", "Debit", period_list, only_current_fiscal_year=False) liability = get_data(filters.company, "Liability", "Credit", period_list, only_current_fiscal_year=False) diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py index 7a776f57e16..d2c8c3e5f1c 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.py +++ b/erpnext/accounts/report/cash_flow/cash_flow.py @@ -11,7 +11,7 @@ from erpnext.accounts.utils import get_fiscal_year def execute(filters=None): period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, - filters.periodicity) + filters.periodicity, filters.company) operation_accounts = { "section_name": "Operations", diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index c897d1ca61e..5e84a650d74 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -6,7 +6,7 @@ import frappe from frappe import _ from frappe.utils import flt, getdate, get_first_day, add_months, add_days, formatdate -def get_period_list(from_fiscal_year, to_fiscal_year, periodicity): +def get_period_list(from_fiscal_year, to_fiscal_year, periodicity, company): """Get a list of dict {"from_date": from_date, "to_date": to_date, "key": key, "label": label} Periodicity can be (Yearly, Quarterly, Monthly)""" @@ -48,7 +48,7 @@ def get_period_list(from_fiscal_year, to_fiscal_year, periodicity): # if a fiscal year ends before a 12 month period period.to_date = year_end_date - period.to_date_fiscal_year = get_date_fiscal_year(period.to_date) + period.to_date_fiscal_year = get_date_fiscal_year(period.to_date, company) period_list.append(period) @@ -140,14 +140,15 @@ def calculate_values(accounts_by_name, gl_entries_by_account, period_list, accum if entry.posting_date <= period.to_date: if (accumulated_values or entry.posting_date >= period.from_date) and \ (entry.fiscal_year == period.to_date_fiscal_year or not ignore_accumulated_values_for_fy): + frappe.errprint([entry.fiscal_year, period.to_date_fiscal_year]) d[period.key] = d.get(period.key, 0.0) + flt(entry.debit) - flt(entry.credit) if entry.posting_date < period_list[0].year_start_date: d["opening_balance"] = d.get("opening_balance", 0.0) + flt(entry.debit) - flt(entry.credit) -def get_date_fiscal_year(date): +def get_date_fiscal_year(date, company): from erpnext.accounts.utils import get_fiscal_year - return get_fiscal_year(date)[0] + return get_fiscal_year(date, company=company)[0] def accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values): """accumulate children's values in parent accounts""" diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 34512388487..df6cb3c33a6 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import frappe from frappe import _, scrub +from erpnext.stock.utils import get_incoming_rate from frappe.utils import flt @@ -208,21 +209,18 @@ class GrossProfitGenerator(object): flt(my_sle[i+1].stock_value) or 0.0 return previous_stock_value - flt(sle.stock_value) else: - return flt(row.qty) * self.get_average_buying_rate(item_code) - + return flt(row.qty) * self.get_average_buying_rate(row, item_code) return 0.0 - def get_average_buying_rate(self, item_code): + def get_average_buying_rate(self, row, item_code): if not item_code in self.average_buying_rate: if item_code in self.non_stock_items: self.average_buying_rate[item_code] = flt(frappe.db.sql("""select sum(base_net_amount) / sum(qty * conversion_factor) from `tabPurchase Invoice Item` where item_code = %s and docstatus=1""", item_code)[0][0]) else: - self.average_buying_rate[item_code] = flt(frappe.db.sql("""select avg(valuation_rate) - from `tabStock Ledger Entry` - where item_code = %s and qty_after_transaction > 0""", item_code)[0][0]) + self.average_buying_rate[item_code] = get_incoming_rate(row) return self.average_buying_rate[item_code] 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 747eb43006d..02dc8700356 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 @@ -8,13 +8,14 @@ from frappe.utils import flt from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data) def execute(filters=None): - period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity) - + period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, + filters.periodicity, filters.company) + income = get_data(filters.company, "Income", "Credit", period_list, filters = filters, accumulated_values=filters.accumulated_values, ignore_closing_entries=True, ignore_accumulated_values_for_fy= True) expense = get_data(filters.company, "Expense", "Debit", period_list, filters=filters, accumulated_values=filters.accumulated_values, ignore_closing_entries=True, ignore_accumulated_values_for_fy= True) - + net_profit_loss = get_net_profit_loss(income, expense, period_list, filters.company) data = [] @@ -24,7 +25,7 @@ def execute(filters=None): data.append(net_profit_loss) columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company) - + chart = get_chart_data(filters, columns, income, expense, net_profit_loss) return columns, data, None, chart @@ -43,21 +44,21 @@ def get_net_profit_loss(income, expense, period_list, company): for period in period_list: net_profit_loss[period.key] = flt(income[-2][period.key] - expense[-2][period.key], 3) - + if net_profit_loss[period.key]: has_value=True - + total += flt(net_profit_loss[period.key]) net_profit_loss["total"] = total - + if has_value: return net_profit_loss def get_chart_data(filters, columns, income, expense, net_profit_loss): x_intervals = ['x'] + [d.get("label") for d in columns[2:]] - + income_data, expense_data, net_profit = [], [], [] - + for p in columns[2:]: if income: income_data.append(income[-2].get(p.get("fieldname"))) @@ -65,7 +66,7 @@ def get_chart_data(filters, columns, income, expense, net_profit_loss): expense_data.append(expense[-2].get(p.get("fieldname"))) if net_profit_loss: net_profit.append(net_profit_loss.get(p.get("fieldname"))) - + columns = [x_intervals] if income_data: columns.append(["Income"] + income_data) @@ -73,15 +74,20 @@ def get_chart_data(filters, columns, income, expense, net_profit_loss): columns.append(["Expense"] + expense_data) if net_profit: columns.append(["Net Profit/Loss"] + net_profit) - + chart = { "data": { 'x': 'x', - 'columns': columns + 'columns': columns, + 'colors': { + 'Income': '#5E64FF', + 'Expense': '#b8c2cc', + 'Net Profit/Loss': '#ff5858' + } } } - + if not filters.accumulated_values: chart["chart_type"] = "bar" - + return chart \ No newline at end of file diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.py b/erpnext/accounts/report/profitability_analysis/profitability_analysis.py index 09ba40ca75c..c0a42127e88 100644 --- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.py +++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.py @@ -11,9 +11,11 @@ from erpnext.accounts.report.trial_balance.trial_balance import validate_filters value_fields = ("income", "expense", "gross_profit_loss") def execute(filters=None): + if not filters.get('based_on'): filters["based_on"] = 'Cost Center' + based_on = filters.based_on.replace(' ', '_').lower() validate_filters(filters) - accounts = get_accounts_data(based_on, filters.company) + accounts = get_accounts_data(based_on, filters.get("company")) data = get_data(accounts, filters, based_on) columns = get_columns(filters) return columns, data @@ -27,14 +29,14 @@ def get_accounts_data(based_on, company): def get_data(accounts, filters, based_on): if not accounts: - return None + return [] accounts, accounts_by_name, parent_children_map = filter_accounts(accounts) gl_entries_by_account = {} - set_gl_entries_by_account(filters.company, filters.from_date, - filters.to_date, based_on, gl_entries_by_account, ignore_closing_entries=not flt(filters.with_period_closing_entry)) + set_gl_entries_by_account(filters.get("company"), filters.get("from_date"), + filters.get("to_date"), based_on, gl_entries_by_account, ignore_closing_entries=not flt(filters.get("with_period_closing_entry"))) total_row = calculate_values(accounts, gl_entries_by_account, filters) accumulate_values_into_parents(accounts, accounts_by_name) @@ -90,7 +92,7 @@ def accumulate_values_into_parents(accounts, accounts_by_name): def prepare_data(accounts, filters, total_row, parent_children_map, based_on): data = [] - company_currency = frappe.db.get_value("Company", filters.company, "default_currency") + company_currency = frappe.db.get_value("Company", filters.get("company"), "default_currency") for d in accounts: has_value = False @@ -99,7 +101,7 @@ def prepare_data(accounts, filters, total_row, parent_children_map, based_on): "account": d.name, "parent_account": d.parent_account, "indent": d.indent, - "fiscal_year": filters.fiscal_year, + "fiscal_year": filters.get("fiscal_year"), "currency": company_currency, "based_on": based_on } @@ -122,9 +124,9 @@ def get_columns(filters): return [ { "fieldname": "account", - "label": _(filters.based_on), + "label": _(filters.get("based_on")), "fieldtype": "Link", - "options": filters.based_on, + "options": filters.get("based_on"), "width": 300 }, { diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index c35ca8222b2..c2812d486e1 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -242,6 +242,7 @@ def add_ac(args=None): if not args: args = frappe.local.form_dict + args.doctype = "Account" args = make_tree_args(**args) ac = frappe.new_doc("Account") @@ -271,7 +272,8 @@ def add_cc(args=None): if not args: args = frappe.local.form_dict - + + args.doctype = "Cost Center" args = make_tree_args(**args) cc = frappe.new_doc("Cost Center") diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index 8194edf6dcc..46a59b7146f 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -72,7 +72,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ this.frm.toggle_display("supplier_name", (this.frm.doc.supplier_name && this.frm.doc.supplier_name!==this.frm.doc.supplier)); - if(this.frm.docstatus==0 && + if(this.frm.doc.docstatus==0 && (this.frm.doctype==="Purchase Order" || this.frm.doctype==="Material Request")) { this.set_from_product_bundle(); } diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.py b/erpnext/buying/doctype/purchase_common/purchase_common.py index 6c10fe1c83c..b35044ad211 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.py +++ b/erpnext/buying/doctype/purchase_common/purchase_common.py @@ -72,8 +72,7 @@ class PurchaseCommon(BuyingController): if items and len(items) != len(set(items)) and \ not cint(frappe.db.get_single_value("Buying Settings", "allow_multiple_items") or 0): - frappe.msgprint(_("Warning: Same item has been entered multiple times."), alert=True) - + frappe.throw(_("Same item cannot be entered multiple times.")) def check_for_closed_status(self, doctype, docname): status = frappe.db.get_value(doctype, docname, "status") diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index f2f04fe88cc..01a9a2ff182 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -6,6 +6,13 @@ frappe.provide("erpnext.buying"); {% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %}; frappe.ui.form.on("Purchase Order", { + setup: function(frm) { + frm.custom_make_buttons = { + 'Purchase Receipt': 'Receive', + 'Purchase Invoice': 'Invoice', + 'Stock Entry': 'Material to Supplier' + } + }, onload: function(frm) { erpnext.queries.setup_queries(frm, "Warehouse", function() { return erpnext.queries.warehouse(frm.doc); @@ -28,10 +35,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( var item = cur_frm.doc.items[i]; if(item.delivered_by_supplier !== 1) { allow_receipt = true; - } - - else { - is_drop_ship = true + } else { + is_drop_ship = true; } if(is_drop_ship && allow_receipt) { @@ -66,7 +71,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( if(doc.docstatus == 1 && doc.status != "Closed") { if(flt(doc.per_received, 2) < 100 && allow_receipt) { - cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt, __("Make")); + cur_frm.add_custom_button(__('Receipt'), this.make_purchase_receipt, __("Make")); if(doc.is_subcontracted==="Yes") { cur_frm.add_custom_button(__('Material to Supplier'), diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index d4a0d0737d5..17786aa443a 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -112,6 +112,7 @@ class TestPurchaseOrder(unittest.TestCase): self.assertEquals(get_ordered_qty(item_code="_Test Item", warehouse="_Test Warehouse - _TC"), existing_ordered_qty) def test_group_same_items(self): + frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1) frappe.get_doc({ "doctype": "Purchase Order", "company": "_Test Company", @@ -121,10 +122,10 @@ class TestPurchaseOrder(unittest.TestCase): "conversion_factor" : 1, "items" : get_same_items(), "group_same_items": 1 - }).insert() + }).insert(ignore_permissions=True) -def get_same_items(): +def get_same_items(): return [ { "item_code": "_Test FG Item", diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json index 6fb6af72a89..12d0da85d77 100755 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json @@ -10,6 +10,7 @@ "doctype": "DocType", "document_type": "Document", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, @@ -21,8 +22,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Code", "length": 0, "no_copy": 0, @@ -33,6 +36,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 1, @@ -51,7 +55,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Supplier Part Number", "length": 0, "no_copy": 0, @@ -59,6 +65,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -75,8 +82,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, + "in_standard_filter": 0, "label": "Item Name", "length": 0, "no_copy": 0, @@ -86,6 +95,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 1, @@ -103,7 +113,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -111,6 +123,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -127,8 +140,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Reqd By Date", "length": 0, "no_copy": 0, @@ -138,6 +153,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 1, @@ -155,7 +171,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Expected Delivery Date", "length": 0, "no_copy": 0, @@ -164,6 +182,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -181,7 +200,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -190,6 +211,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -207,7 +229,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -218,6 +242,7 @@ "print_hide_if_no_value": 0, "print_width": "300px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -236,13 +261,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -260,7 +288,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Image", "length": 0, "no_copy": 0, @@ -269,6 +299,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -286,7 +317,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Image View", "length": 0, "no_copy": 0, @@ -296,6 +329,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -313,7 +347,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Quantity and Rate", "length": 0, "no_copy": 0, @@ -321,6 +357,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -338,7 +375,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Quantity", "length": 0, "no_copy": 0, @@ -349,6 +388,7 @@ "print_hide_if_no_value": 0, "print_width": "60px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -367,7 +407,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Stock UOM", "length": 0, "no_copy": 0, @@ -379,6 +421,7 @@ "print_hide_if_no_value": 0, "print_width": "100px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -397,13 +440,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -421,7 +467,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "UOM", "length": 0, "no_copy": 0, @@ -433,6 +481,7 @@ "print_hide_if_no_value": 0, "print_width": "100px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -451,7 +500,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "UOM Conversion Factor", "length": 0, "no_copy": 0, @@ -462,6 +513,7 @@ "print_hide_if_no_value": 0, "print_width": "100px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -480,13 +532,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -504,7 +559,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Price List Rate", "length": 0, "no_copy": 0, @@ -513,6 +570,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -531,7 +589,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Discount on Price List Rate (%)", "length": 0, "no_copy": 0, @@ -539,6 +599,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -556,13 +617,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -580,7 +644,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Price List Rate (Company Currency)", "length": 0, "no_copy": 0, @@ -589,6 +655,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -606,13 +673,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -630,7 +700,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Rate", "length": 0, "no_copy": 0, @@ -641,6 +713,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -658,7 +731,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Amount", "length": 0, "no_copy": 0, @@ -669,6 +744,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -686,13 +762,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -710,7 +789,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Rate (Company Currency)", "length": 0, "no_copy": 0, @@ -722,6 +803,7 @@ "print_hide_if_no_value": 0, "print_width": "100px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -740,7 +822,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Amount (Company Currency)", "length": 0, "no_copy": 0, @@ -751,6 +835,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -768,7 +853,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Pricing Rule", "length": 0, "no_copy": 0, @@ -777,6 +864,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -794,7 +882,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -802,6 +892,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -819,7 +910,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Net Rate", "length": 0, "no_copy": 0, @@ -829,6 +922,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -846,7 +940,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Net Amount", "length": 0, "no_copy": 0, @@ -856,6 +952,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -873,7 +970,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -881,6 +980,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -898,7 +998,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Net Rate (Company Currency)", "length": 0, "no_copy": 0, @@ -908,6 +1010,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -925,7 +1028,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Net Amount (Company Currency)", "length": 0, "no_copy": 0, @@ -935,6 +1040,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -952,7 +1058,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Warehouse and Reference", "length": 0, "no_copy": 0, @@ -960,6 +1068,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -977,7 +1086,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Warehouse", "length": 0, "no_copy": 0, @@ -988,6 +1099,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1004,8 +1116,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Project", "length": 0, "no_copy": 0, @@ -1014,6 +1128,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1030,8 +1145,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Material Request", "length": 0, "no_copy": 1, @@ -1043,6 +1160,7 @@ "print_hide_if_no_value": 0, "print_width": "120px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -1060,8 +1178,10 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Material Request Item", "length": 0, "no_copy": 1, @@ -1071,6 +1191,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -1088,7 +1209,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Sales Order", "length": 0, "no_copy": 1, @@ -1098,6 +1221,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -1115,7 +1239,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Sales Order Item", "length": 0, "no_copy": 1, @@ -1124,6 +1250,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -1141,7 +1268,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Supplier Quotation", "length": 0, "no_copy": 1, @@ -1150,6 +1279,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1167,7 +1297,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Supplier Quotation Item", "length": 0, "no_copy": 1, @@ -1176,6 +1308,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1193,7 +1326,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "To be delivered to customer", "length": 0, "no_copy": 0, @@ -1202,6 +1337,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1219,13 +1355,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1243,8 +1382,10 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Item Group", "length": 0, "no_copy": 0, @@ -1255,6 +1396,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1272,7 +1414,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Brand", "length": 0, "no_copy": 0, @@ -1283,6 +1427,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1300,7 +1445,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "BOM", "length": 0, "no_copy": 0, @@ -1310,6 +1457,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1327,7 +1475,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Qty as per Stock UOM", "length": 0, "no_copy": 1, @@ -1338,6 +1488,7 @@ "print_hide_if_no_value": 0, "print_width": "100px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1356,7 +1507,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Received Qty", "length": 0, "no_copy": 1, @@ -1366,6 +1519,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1384,7 +1538,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Returned Qty", "length": 0, "no_copy": 1, @@ -1393,6 +1549,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1410,7 +1567,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Billed Amt", "length": 0, "no_copy": 1, @@ -1419,6 +1578,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1437,7 +1597,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Item Tax Rate", "length": 0, "no_copy": 0, @@ -1447,6 +1609,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 1, "reqd": 0, "search_index": 0, @@ -1464,7 +1627,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Page Break", "length": 0, "no_copy": 1, @@ -1474,6 +1639,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1491,7 +1657,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-10-26 16:07:40.592325", + "modified": "2017-02-17 16:44:55.434162", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order Item", @@ -1500,7 +1666,9 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 1, "track_seen": 0 -} +} \ No newline at end of file diff --git a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.json b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.json index d92aa781e0e..85130a152f0 100644 --- a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.json +++ b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.json @@ -8,18 +8,22 @@ "docstatus": 0, "doctype": "DocType", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "main_item_code", "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Code", "length": 0, "no_copy": 0, @@ -29,6 +33,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -39,13 +44,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "rm_item_code", "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Raw Material Item Code", "length": 0, "no_copy": 0, @@ -55,6 +63,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -65,13 +74,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "description", "fieldtype": "Text Editor", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -82,6 +94,7 @@ "print_hide_if_no_value": 0, "print_width": "300px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -93,13 +106,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "batch_no", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Batch No", "length": 0, "no_copy": 1, @@ -108,6 +124,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -118,13 +135,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "serial_no", "fieldtype": "Text", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Serial No", "length": 0, "no_copy": 1, @@ -132,6 +152,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -142,19 +163,23 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "col_break1", "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -165,13 +190,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "required_qty", "fieldtype": "Float", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Required Qty", "length": 0, "no_copy": 0, @@ -181,6 +209,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -191,13 +220,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "consumed_qty", "fieldtype": "Float", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Consumed Qty", "length": 0, "no_copy": 0, @@ -207,6 +239,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -217,13 +250,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "stock_uom", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Stock Uom", "length": 0, "no_copy": 0, @@ -234,6 +270,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -244,13 +281,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "rate", "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Rate", "length": 0, "no_copy": 0, @@ -261,6 +301,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -271,13 +312,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "amount", "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Amount", "length": 0, "no_copy": 0, @@ -288,6 +332,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -298,13 +343,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "conversion_factor", "fieldtype": "Float", "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Conversion Factor", "length": 0, "no_copy": 0, @@ -314,6 +362,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -324,13 +373,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "current_stock", "fieldtype": "Float", "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Current Stock", "length": 0, "no_copy": 0, @@ -340,6 +392,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -350,13 +403,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "reference_name", "fieldtype": "Data", "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Reference Name", "length": 0, "no_copy": 0, @@ -366,6 +422,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -376,13 +433,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "bom_detail_no", "fieldtype": "Data", "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "BOM Detail No", "length": 0, "no_copy": 0, @@ -392,6 +452,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -409,7 +470,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-07-11 03:28:05.972909", + "modified": "2017-02-17 16:43:21.668443", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Receipt Item Supplied", @@ -418,7 +479,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js index 7e06081922d..4b28ee854b4 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js @@ -8,6 +8,10 @@ cur_frm.add_fetch('contact', 'email_id', 'email_id') frappe.ui.form.on("Request for Quotation",{ setup: function(frm) { + frm.custom_make_buttons = { + 'Supplier Quotation': 'Supplier Quotation' + } + frm.fields_dict["suppliers"].grid.get_field("contact").get_query = function(doc, cdt, cdn){ var d =locals[cdt][cdn]; return { diff --git a/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.json b/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.json index cc7e36cfcb9..a7ae8a6c2a5 100644 --- a/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.json +++ b/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.json @@ -10,6 +10,7 @@ "doctype": "DocType", "document_type": "", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, @@ -21,8 +22,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Code", "length": 0, "no_copy": 0, @@ -34,6 +37,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 1, @@ -51,7 +55,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Supplier Part No", "length": 0, "no_copy": 1, @@ -60,6 +66,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -77,7 +84,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -85,6 +94,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -101,8 +111,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, + "in_standard_filter": 0, "label": "Item Name", "length": 0, "no_copy": 0, @@ -113,6 +125,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -130,7 +143,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -139,6 +154,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -156,7 +172,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -168,6 +186,7 @@ "print_hide_if_no_value": 0, "print_width": "300px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -186,7 +205,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -194,6 +215,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -211,7 +233,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Image", "length": 0, "no_copy": 0, @@ -220,6 +244,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -237,7 +262,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Image View", "length": 0, "no_copy": 0, @@ -247,6 +274,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -264,7 +292,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Quantity", "length": 0, "no_copy": 0, @@ -273,6 +303,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -290,7 +321,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Quantity", "length": 0, "no_copy": 0, @@ -302,6 +335,7 @@ "print_hide_if_no_value": 0, "print_width": "60px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -320,7 +354,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -328,6 +364,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -346,7 +383,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Required Date", "length": 0, "no_copy": 0, @@ -355,6 +394,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -372,7 +412,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "UOM", "length": 0, "no_copy": 0, @@ -385,6 +427,7 @@ "print_hide_if_no_value": 0, "print_width": "100px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -403,7 +446,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Warehouse and Reference", "length": 0, "no_copy": 0, @@ -412,6 +457,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -429,7 +475,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Warehouse", "length": 0, "no_copy": 0, @@ -441,6 +489,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -457,8 +506,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Project Name", "length": 0, "no_copy": 0, @@ -468,6 +519,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -485,7 +537,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Material Request", "length": 0, "no_copy": 0, @@ -495,6 +549,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -512,7 +567,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -520,6 +577,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -537,7 +595,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Material Request Item", "length": 0, "no_copy": 0, @@ -546,6 +606,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -563,7 +624,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Brand", "length": 0, "no_copy": 0, @@ -575,6 +638,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -592,8 +656,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Item Group", "length": 0, "no_copy": 0, @@ -605,6 +671,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -622,7 +689,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Page Break", "length": 0, "no_copy": 1, @@ -633,6 +702,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -650,7 +720,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-08-26 02:40:48.487168", + "modified": "2017-02-17 16:43:46.152268", "modified_by": "Administrator", "module": "Buying", "name": "Request for Quotation Item", @@ -660,7 +730,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json index 0af30c2778e..7bc0deff54e 100644 --- a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json +++ b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json @@ -9,6 +9,7 @@ "doctype": "DocType", "document_type": "", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 1, @@ -22,7 +23,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Send Email", "length": 0, "no_copy": 0, @@ -31,6 +34,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -48,7 +52,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Supplier", "length": 0, "no_copy": 0, @@ -58,6 +64,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -75,7 +82,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Contact", "length": 0, "no_copy": 1, @@ -85,6 +94,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -102,7 +112,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -110,6 +122,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -127,7 +140,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, + "in_standard_filter": 0, "label": "Supplier Name", "length": 0, "no_copy": 0, @@ -137,6 +152,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -154,8 +170,10 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, - "label": "Email Address", + "in_standard_filter": 0, + "label": "Email Id", "length": 0, "no_copy": 1, "options": "contact.email_id", @@ -164,6 +182,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -181,7 +200,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Download PDF", "length": 0, "no_copy": 0, @@ -190,6 +211,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -207,7 +229,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-08-26 02:38:45.634613", + "modified": "2017-02-17 16:42:57.254211", "modified_by": "Administrator", "module": "Buying", "name": "Request for Quotation Supplier", @@ -217,7 +239,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json index 277a5b96a9b..76f28ae8927 100644 --- a/erpnext/buying/doctype/supplier/supplier.json +++ b/erpnext/buying/doctype/supplier/supplier.json @@ -24,6 +24,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Name and Type", @@ -53,6 +54,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -83,6 +85,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier Name", @@ -112,6 +115,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Country", @@ -141,6 +145,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Image", @@ -169,6 +174,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -196,6 +202,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Supplier Type", @@ -226,6 +233,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Print Language", @@ -256,6 +264,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Disabled", @@ -284,6 +293,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Currency and Price List", @@ -312,6 +322,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Billing Currency", @@ -340,6 +351,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -367,6 +379,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List", @@ -395,6 +408,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Credit Limit", @@ -423,6 +437,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Credit Days Based On", @@ -453,6 +468,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Credit Days", @@ -481,6 +497,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address and Contacts", @@ -510,6 +527,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address HTML", @@ -537,6 +555,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -564,6 +583,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact HTML", @@ -592,6 +612,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Default Payable Accounts", @@ -621,6 +642,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accounts", @@ -650,6 +672,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "More Information", @@ -678,6 +701,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Website", @@ -708,6 +732,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier Details", @@ -737,6 +762,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Frozen", @@ -767,7 +793,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-01-30 00:52:31.193443", + "modified": "2017-02-17 16:46:48.202078", "modified_by": "Administrator", "module": "Buying", "name": "Supplier", @@ -919,6 +945,7 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "supplier_name, supplier_type", + "show_name_in_global_search": 1, "sort_order": "ASC", "title_field": "supplier_name", "track_changes": 0, diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js index dfbb4a335f9..5ed210ca98b 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js @@ -4,6 +4,14 @@ // attach required files {% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %}; +frappe.ui.form.on('Suppier Quotation', { + setup: function() { + frm.custom_make_buttons = { + 'Purchase Order': 'Purchase Order' + } + } +}); + erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.extend({ refresh: function() { this._super(); diff --git a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json index 73ebf23005c..622e6307132 100644 --- a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json +++ b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json @@ -10,6 +10,7 @@ "doctype": "DocType", "document_type": "Document", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, @@ -21,8 +22,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Code", "length": 0, "no_copy": 0, @@ -33,6 +36,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 1, @@ -51,7 +55,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Supplier Part Number", "length": 0, "no_copy": 0, @@ -59,6 +65,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -76,7 +83,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -84,6 +93,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -100,8 +110,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, + "in_standard_filter": 0, "label": "Item Name", "length": 0, "no_copy": 0, @@ -111,6 +123,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -128,7 +141,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -137,6 +152,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -154,7 +170,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -165,6 +183,7 @@ "print_hide_if_no_value": 0, "print_width": "300px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -183,13 +202,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -207,7 +229,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Image", "length": 0, "no_copy": 0, @@ -216,6 +240,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -233,7 +258,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Image View", "length": 0, "no_copy": 0, @@ -243,6 +270,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -260,7 +288,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Quantity and Rate", "length": 0, "no_copy": 0, @@ -268,6 +298,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -285,7 +316,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Quantity", "length": 0, "no_copy": 0, @@ -296,6 +329,7 @@ "print_hide_if_no_value": 0, "print_width": "60px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -314,7 +348,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Stock UOM", "length": 0, "no_copy": 0, @@ -324,6 +360,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -341,7 +378,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Price List Rate", "length": 0, "no_copy": 0, @@ -350,6 +389,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -368,7 +408,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Discount on Price List Rate (%)", "length": 0, "no_copy": 0, @@ -376,6 +418,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -393,13 +436,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -417,7 +463,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "UOM", "length": 0, "no_copy": 0, @@ -429,6 +477,7 @@ "print_hide_if_no_value": 0, "print_width": "100px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -447,7 +496,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "UOM Conversion Factor", "length": 0, "no_copy": 0, @@ -456,6 +507,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -473,7 +525,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Price List Rate (Company Currency)", "length": 0, "no_copy": 0, @@ -482,6 +536,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -499,13 +554,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -523,7 +581,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Rate ", "length": 0, "no_copy": 0, @@ -534,6 +594,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -551,7 +612,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Amount", "length": 0, "no_copy": 0, @@ -562,6 +625,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -579,13 +643,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -603,7 +670,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Rate (Company Currency)", "length": 0, "no_copy": 0, @@ -616,6 +685,7 @@ "print_hide_if_no_value": 0, "print_width": "100px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -634,7 +704,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Amount (Company Currency)", "length": 0, "no_copy": 0, @@ -645,6 +717,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -662,7 +735,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Pricing Rule", "length": 0, "no_copy": 0, @@ -671,6 +746,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -688,7 +764,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -696,6 +774,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -713,7 +792,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Net Rate", "length": 0, "no_copy": 0, @@ -722,6 +803,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -739,7 +821,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Net Amount", "length": 0, "no_copy": 0, @@ -749,6 +833,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -766,7 +851,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -774,6 +861,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -791,7 +879,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Net Rate (Company Currency)", "length": 0, "no_copy": 0, @@ -801,6 +891,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -818,7 +909,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Net Amount (Company Currency)", "length": 0, "no_copy": 0, @@ -828,6 +921,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -845,7 +939,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Warehouse and Reference", "length": 0, "no_copy": 0, @@ -853,6 +949,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -870,7 +967,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Warehouse", "length": 0, "no_copy": 0, @@ -881,6 +980,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -897,8 +997,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Project", "length": 0, "no_copy": 0, @@ -907,6 +1009,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -924,7 +1027,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Prevdoc DocType", "length": 0, "no_copy": 1, @@ -934,6 +1039,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -950,8 +1056,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Material Request", "length": 0, "no_copy": 0, @@ -963,6 +1071,7 @@ "print_hide_if_no_value": 0, "print_width": "120px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -981,7 +1090,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Request for Quotation", "length": 0, "no_copy": 1, @@ -991,6 +1102,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1008,13 +1120,16 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1031,8 +1146,10 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Material Request Item", "length": 0, "no_copy": 0, @@ -1042,6 +1159,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -1059,7 +1177,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Request for Quotation Item", "length": 0, "no_copy": 1, @@ -1068,6 +1188,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1085,7 +1206,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Brand", "length": 0, "no_copy": 0, @@ -1096,6 +1219,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1113,8 +1237,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Item Group", "length": 0, "no_copy": 0, @@ -1125,6 +1251,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1143,7 +1270,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Item Tax Rate", "length": 0, "no_copy": 0, @@ -1153,6 +1282,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 1, "reqd": 0, "search_index": 0, @@ -1170,7 +1300,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -1178,6 +1310,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1195,7 +1328,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Qty as per Stock UOM", "length": 0, "no_copy": 1, @@ -1204,6 +1339,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1221,7 +1357,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Page Break", "length": 0, "no_copy": 1, @@ -1231,6 +1369,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1248,7 +1387,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-09-06 02:40:11.022104", + "modified": "2017-02-17 16:43:59.582188", "modified_by": "Administrator", "module": "Buying", "name": "Supplier Quotation Item", @@ -1257,7 +1396,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/config/learn.py b/erpnext/config/learn.py index 426449ba69c..86db8081d75 100644 --- a/erpnext/config/learn.py +++ b/erpnext/config/learn.py @@ -44,7 +44,7 @@ def get_data(): }, { "type": "help", - "label": _("Setting up Email"), + "label": _("Setting up Email Account"), "youtube_id": "YFYe0DrB95o" }, { @@ -62,11 +62,6 @@ def get_data(): "label": _("Workflow"), "youtube_id": "yObJUg9FxFs" }, - { - "type": "help", - "label": _("Email Account"), - "youtube_id": "YFYe0DrB95o" - }, { "type": "help", "label": _("File Manager"), diff --git a/erpnext/config/manufacturing.py b/erpnext/config/manufacturing.py index 0f769529b2a..a930ddc6ef3 100644 --- a/erpnext/config/manufacturing.py +++ b/erpnext/config/manufacturing.py @@ -112,13 +112,18 @@ def get_data(): "is_query_report": True, "name": "Completed Production Orders", "doctype": "Production Order" + },{ + "type": "page", + "name": "production-analytics", + "label": _("Production Analytics"), + "icon": "fa fa-bar-chart", }, { "type": "report", "is_query_report": True, "name": "BOM Search", "doctype": "BOM" - }, + } ] }, { diff --git a/erpnext/config/schools.py b/erpnext/config/schools.py index e95b73495cc..b1e0472f625 100644 --- a/erpnext/config/schools.py +++ b/erpnext/config/schools.py @@ -116,7 +116,8 @@ def get_data(): }, { "type": "doctype", - "name": "Assessment Group" + "name": "Assessment Group", + "link": "Tree/Assessment Group", }, { "type": "doctype", diff --git a/erpnext/config/setup.py b/erpnext/config/setup.py index 9c9bae2fdcb..878b2f2a0c6 100644 --- a/erpnext/config/setup.py +++ b/erpnext/config/setup.py @@ -94,6 +94,12 @@ def get_data(): "label": _("Email"), "icon": "fa fa-envelope", "items": [ + { + "type": "doctype", + "name": "Feedback Trigger", + "label": _("Feedback Trigger"), + "description": _("Automatically triggers the feedback request based on conditions.") + }, { "type": "doctype", "name": "Email Digest", diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index c4ba9e7b1dd..1d1b4e21989 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -178,6 +178,9 @@ class BuyingController(StockController): for item in self.get("items"): item.rm_supp_cost = 0.0 + if self.is_subcontracted == "No" and self.get("supplied_items"): + self.set('supplied_items', []) + def update_raw_materials_supplied(self, item, raw_material_table): bom_items = self.get_items_from_bom(item.item_code, item.bom) raw_materials_cost = 0 diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py index 25ae1b2d88b..cb73159efcc 100644 --- a/erpnext/controllers/print_settings.py +++ b/erpnext/controllers/print_settings.py @@ -16,14 +16,13 @@ def print_settings_for_item_table(doc): if doc.flags.compact_item_print: doc.print_templates["description"] = "templates/print_formats/includes/item_table_description.html" - doc.hide_in_print_layout += ["item_code", "item_name", "image"] - doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"] - doc.flags.show_in_description = [] + doc.flags.format_columns = format_columns - for df in doc.meta.fields: - if df.fieldtype not in ("Section Break", "Column Break", "Button"): - if not doc.is_print_hide(df.fieldname): - if df.fieldname not in doc.hide_in_print_layout and df.fieldname not in doc.flags.compact_item_fields: - doc.hide_in_print_layout.append(df.fieldname) - doc.flags.show_in_description.append(df.fieldname) +def format_columns(display_columns, compact_fields): + compact_fields = compact_fields + ["image", "item_code", "item_name"] + final_columns = [] + for column in display_columns: + if column not in compact_fields: + final_columns.append(column) + return final_columns diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index cc3f27724e2..88600e88cc2 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import frappe from frappe.desk.reportview import get_match_cond, get_filters_cond from frappe.utils import nowdate +from collections import defaultdict # searches for active employees @@ -348,3 +349,46 @@ def get_expense_account(doctype, txt, searchfield, start, page_len, filters): 'company': filters.get("company", ""), 'txt': "%%%s%%" % frappe.db.escape(txt) }) + + +@frappe.whitelist() +def warehouse_query(doctype, txt, searchfield, start, page_len, filters): + # Should be used when item code is passed in filters. + conditions, bin_conditions = [], [] + filter_dict = get_doctype_wise_filters(filters) + + sub_query = """ select round(`tabBin`.actual_qty, 2) from `tabBin` + where `tabBin`.warehouse = `tabWarehouse`.name + {bin_conditions} """.format( + bin_conditions=get_filters_cond(doctype, filter_dict.get("Bin"), bin_conditions)) + + response = frappe.db.sql("""select `tabWarehouse`.name, + CONCAT_WS(" : ", "Actual Qty", ifnull( ({sub_query}), 0) ) as actual_qty + from `tabWarehouse` + where + `tabWarehouse`.`{key}` like %(txt)s + {fcond} {mcond} + order by + `tabWarehouse`.name desc + limit + %(start)s, %(page_len)s + """.format( + sub_query=sub_query, + key=frappe.db.escape(searchfield), + fcond=get_filters_cond(doctype, filter_dict.get("Warehouse"), conditions), + mcond=get_match_cond(doctype) + ), + { + "txt": "%%%s%%" % frappe.db.escape(txt), + "start": start, + "page_len": page_len + }) + return response + + +def get_doctype_wise_filters(filters): + # Helper function to seperate filters doctype_wise + filter_dict = defaultdict(list) + for row in filters: + filter_dict[row[0]].append(row) + return filter_dict diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index c4890089da7..add882cbbfc 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -54,9 +54,16 @@ class StockController(AccountsController): self.check_expense_account(item_row) - if not sle.stock_value_difference: - self.update_stock_ledger_entries(sle) - self.validate_negative_stock(sle) + # If item is not a sample item + # and ( valuation rate not mentioned in an incoming entry + # or incoming entry not found while delivering the item), + # try to pick valuation rate from previous sle or Item master and update in SLE + # Otherwise, throw an exception + + if not sle.stock_value_difference and self.doctype != "Stock Reconciliation" \ + and not item_row.get("is_sample_item"): + + sle = self.update_stock_ledger_entries(sle) gl_list.append(self.get_gl_dict({ "account": warehouse_account[sle.warehouse]["name"], @@ -89,20 +96,25 @@ class StockController(AccountsController): return process_gl_map(gl_list) def update_stock_ledger_entries(self, sle): - sle.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse, - sle.voucher_type, sle.voucher_no) + sle.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse, + self.doctype, self.name) + sle.stock_value = flt(sle.qty_after_transaction) * flt(sle.valuation_rate) - sle.stock_value_difference = sle.stock_value + sle.stock_value_difference = flt(sle.actual_qty) * flt(sle.valuation_rate) + if sle.name: - frappe.db.sql(""" update `tabStock Ledger Entry` set stock_value = %(stock_value)s, - valuation_rate = %(valuation_rate)s, stock_value_difference = %(stock_value_difference)s - where name = %(name)s""", (sle)) - - def validate_negative_stock(self, sle): - if sle.qty_after_transaction < 0 and sle.actual_qty < 0: - frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries (for booking expenses). Please create an incoming stock transaction or mention valuation rate in Item record, and then try submiting {1} {2}") - .format(sle.item_code, sle.voucher_type, sle.voucher_no)) - + frappe.db.sql(""" + update + `tabStock Ledger Entry` + set + stock_value = %(stock_value)s, + valuation_rate = %(valuation_rate)s, + stock_value_difference = %(stock_value_difference)s + where + name = %(name)s""", (sle)) + + return sle + def get_voucher_details(self, default_expense_account, default_cost_center, sle_map): if self.doctype == "Stock Reconciliation": return [frappe._dict({ "name": voucher_detail_no, "expense_account": default_expense_account, @@ -150,10 +162,18 @@ class StockController(AccountsController): def get_stock_ledger_details(self): stock_ledger = {} - for sle in frappe.db.sql("""select name, warehouse, stock_value_difference, - voucher_detail_no, item_code, posting_date, posting_time, actual_qty, qty_after_transaction - from `tabStock Ledger Entry` where voucher_type=%s and voucher_no=%s""", - (self.doctype, self.name), as_dict=True): + stock_ledger_entries = frappe.db.sql(""" + select + name, warehouse, stock_value_difference, valuation_rate, + voucher_detail_no, item_code, posting_date, posting_time, + actual_qty, qty_after_transaction + from + `tabStock Ledger Entry` + where + voucher_type=%s and voucher_no=%s + """, (self.doctype, self.name), as_dict=True) + + for sle in stock_ledger_entries: stock_ledger.setdefault(sle.voucher_detail_no, []).append(sle) return stock_ledger diff --git a/erpnext/crm/doctype/lead/lead.json b/erpnext/crm/doctype/lead/lead.json index 8c4be89a2bf..17c4022ef0c 100644 --- a/erpnext/crm/doctype/lead/lead.json +++ b/erpnext/crm/doctype/lead/lead.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -79,7 +81,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Person Name", @@ -108,7 +111,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Organization Name", @@ -138,6 +142,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Email Address", @@ -168,6 +173,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -195,7 +201,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Status", @@ -220,12 +227,14 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "source", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Source", @@ -250,13 +259,14 @@ "bold": 0, "collapsible": 0, "columns": 0, - "depends_on": "eval:doc.source == 'Customer'", + "depends_on": "eval:doc.source == 'Existing Customer'", "fieldname": "customer", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "From Customer", @@ -281,7 +291,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "depends_on": "", + "depends_on": "eval: doc.source==\"Campaign\"", "description": "", "fieldname": "campaign_name", "fieldtype": "Link", @@ -289,6 +299,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Campaign Name", @@ -319,6 +330,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Image", @@ -347,6 +359,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -374,7 +387,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Lead Owner", @@ -405,6 +419,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -431,7 +446,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Next Contact By", @@ -463,7 +479,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Next Contact Date", @@ -494,6 +511,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address & Contact", @@ -524,6 +542,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address Desc", @@ -551,6 +570,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address HTML", @@ -578,6 +598,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -604,6 +625,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Phone", @@ -633,6 +655,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mobile No.", @@ -662,6 +685,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Fax", @@ -691,6 +715,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Website", @@ -721,6 +746,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Territory", @@ -751,6 +777,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "More Information", @@ -779,7 +806,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Lead Type", @@ -809,7 +837,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Market Segment", @@ -840,6 +869,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Industry", @@ -870,6 +900,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Request Type", @@ -900,6 +931,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -928,6 +960,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -958,6 +991,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Unsubscribed", @@ -985,6 +1019,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Blog Subscriber", @@ -1014,7 +1049,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-12-15 05:16:25.037080", + "modified": "2017-02-22 18:53:16.231035", "modified_by": "Administrator", "module": "CRM", "name": "Lead", @@ -1030,7 +1065,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -1051,7 +1085,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1072,7 +1105,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1093,7 +1125,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1114,7 +1145,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -1135,7 +1165,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -1151,8 +1180,10 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "lead_name,lead_owner,status", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "title_field": "lead_name", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py index a268ea22352..e6659f38908 100644 --- a/erpnext/crm/doctype/lead/lead.py +++ b/erpnext/crm/doctype/lead/lead.py @@ -4,8 +4,7 @@ from __future__ import unicode_literals import frappe from frappe import _ -from frappe.utils import (cstr, validate_email_add, cint, comma_and, has_gravatar, - getdate, nowdate) +from frappe.utils import (cstr, validate_email_add, cint, comma_and, has_gravatar, now) from frappe.model.mapper import get_mapped_doc from erpnext.controllers.selling_controller import SellingController @@ -46,7 +45,7 @@ class Lead(SellingController): self.image = has_gravatar(self.email_id) - if self.contact_date and getdate(self.contact_date) < nowdate(): + if self.contact_date and self.contact_date < now(): frappe.throw(_("Next Contact Date cannot be in the past")) def on_update(self): @@ -155,6 +154,9 @@ def make_quotation(source_name, target_doc=None): } }}, target_doc) target_doc.quotation_to = "Lead" + target_doc.run_method("set_missing_values") + target_doc.run_method("set_other_charges") + target_doc.run_method("calculate_taxes_and_totals") return target_doc diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js index b5e195c6aac..d8aa8f7ebb1 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.js +++ b/erpnext/crm/doctype/opportunity/opportunity.js @@ -5,6 +5,12 @@ frappe.provide("erpnext.crm"); cur_frm.email_field = "contact_email"; frappe.ui.form.on("Opportunity", { + setup: function(frm) { + frm.custom_make_buttons = { + 'Quotation': 'Quotation', + 'Supplier Quotation': 'Supplier Quotation' + } + }, customer: function(frm) { frm.trigger('set_contact_link'); erpnext.utils.get_party_details(frm); @@ -101,8 +107,7 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({ $.each([["lead", "lead"], ["customer", "customer"], - ["contact_person", "customer_filter"], - ["territory", "not_a_group_filter"]], function(i, opts) { + ["contact_person", "customer_filter"]], function(i, opts) { me.frm.set_query(opts[0], erpnext.queries[opts[1]]); }); }, diff --git a/erpnext/crm/doctype/opportunity/opportunity.json b/erpnext/crm/doctype/opportunity/opportunity.json index fa0ec81a980..e38ca6d45ec 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.json +++ b/erpnext/crm/doctype/opportunity/opportunity.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -81,6 +83,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Opportunity From", @@ -111,7 +114,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Customer", @@ -142,7 +146,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Lead", @@ -174,6 +179,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer / Lead Name", @@ -201,6 +207,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -229,6 +236,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Title", @@ -258,6 +266,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Opportunity Type", @@ -289,6 +298,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Status", @@ -320,6 +330,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Lost Reason", @@ -347,6 +358,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mins to first response", @@ -375,6 +387,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "With Items", @@ -404,6 +417,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -434,6 +448,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Items", @@ -466,6 +481,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Info", @@ -494,7 +510,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer / Lead Address", @@ -523,6 +540,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address", @@ -553,7 +571,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Territory", @@ -583,7 +602,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Group", @@ -614,6 +634,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -640,7 +661,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Person", @@ -670,6 +692,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact", @@ -698,6 +721,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Email", @@ -726,6 +750,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Mobile No", @@ -754,6 +779,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Source", @@ -783,6 +809,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Source", @@ -814,6 +841,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Campaign", @@ -844,6 +872,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -871,7 +900,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -903,6 +933,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Opportunity Date", @@ -934,6 +965,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Next Contact", @@ -962,7 +994,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Next Contact By", @@ -995,6 +1028,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Next Contact Date", @@ -1024,6 +1058,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1052,6 +1087,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "To Discuss", @@ -1081,6 +1117,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -1113,7 +1150,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:55:17.785342", + "modified": "2017-02-17 16:37:39.028830", "modified_by": "Administrator", "module": "CRM", "name": "Opportunity", @@ -1129,7 +1166,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1150,7 +1186,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1166,9 +1201,11 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "customer", "title_field": "title", + "track_changes": 0, "track_seen": 1 } \ No newline at end of file diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 301dc825e0d..786a36cf6d1 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -245,3 +245,15 @@ def set_multiple_status(names, status): opp = frappe.get_doc("Opportunity", name) opp.status = status opp.save() + +def auto_close_opportunity(): + """ auto close the `Replied` Opportunities after 7 days """ + auto_close_after_days = frappe.db.get_value("Support Settings", "Support Settings", "close_opportunity_after_days") or 15 + + opportunities = frappe.db.sql(""" select name from tabOpportunity where status='Replied' and + modified diff --git a/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md b/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md index 8eefe7fa4a0..efbe95fb25d 100644 --- a/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md +++ b/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md @@ -89,3 +89,5 @@ The movement of the assets (from one warehouse to another) is also tracked via A There is also a dedicated button "Transfer Asset" inside the Asset form to track the Asset Movement. Asset + +{next} diff --git a/erpnext/docs/user/manual/en/accounts/multi-currency-accounting.md b/erpnext/docs/user/manual/en/accounts/multi-currency-accounting.md index 92932b5b1ba..4e444905e14 100644 --- a/erpnext/docs/user/manual/en/accounts/multi-currency-accounting.md +++ b/erpnext/docs/user/manual/en/accounts/multi-currency-accounting.md @@ -116,3 +116,5 @@ In General Ledger, system shows debit / credit amount in both currency if filter In Accounts Receivable / Payable report, system shows all the amounts in Party / Account Currency. Accounts Receivable Report + +{next} diff --git a/erpnext/docs/user/manual/en/accounts/payment-request.md b/erpnext/docs/user/manual/en/accounts/payment-request.md index 67c812d8a37..30f5b1bfe8b 100644 --- a/erpnext/docs/user/manual/en/accounts/payment-request.md +++ b/erpnext/docs/user/manual/en/accounts/payment-request.md @@ -25,4 +25,4 @@ You can notify customer from Payment Request with print format. If customer cont ##### Request Mail Payment Request - +{next} diff --git a/erpnext/docs/user/manual/en/accounts/payments.md b/erpnext/docs/user/manual/en/accounts/payments.md index 881d366a0f0..74da05440f2 100644 --- a/erpnext/docs/user/manual/en/accounts/payments.md +++ b/erpnext/docs/user/manual/en/accounts/payments.md @@ -46,3 +46,5 @@ Save and submit the journal entry to record the payament against the invoice Making Payment For more details about journal entry [check here.]({{docs_base_url}}/user/manual/en/accounts/journal-entry) + +{next} diff --git a/erpnext/docs/user/manual/en/accounts/recurring-orders-and-invoices.md b/erpnext/docs/user/manual/en/accounts/recurring-orders-and-invoices.md index 770e71a083d..713fb60c9e5 100644 --- a/erpnext/docs/user/manual/en/accounts/recurring-orders-and-invoices.md +++ b/erpnext/docs/user/manual/en/accounts/recurring-orders-and-invoices.md @@ -30,4 +30,6 @@ In a situation where recurring invoice is not created successfully, user with Sy Failure in creation of recurring invoice could be due to multiple reasons like wrong Email Address mentioned in the Email Notification field in Recurring section etc. -On receipt of notification, if cause of failure is fixed (like correcting Email Address) within 24 hours, then recurring invoice will be generated automatically. If issue is not fixed within the said time, then document should be created for that month/year manually. \ No newline at end of file +On receipt of notification, if cause of failure is fixed (like correcting Email Address) within 24 hours, then recurring invoice will be generated automatically. If issue is not fixed within the said time, then document should be created for that month/year manually. + +{next} diff --git a/erpnext/docs/user/manual/en/setting-up/company-setup.md b/erpnext/docs/user/manual/en/setting-up/company-setup.md index e73aa25c19f..1a07b86b430 100644 --- a/erpnext/docs/user/manual/en/setting-up/company-setup.md +++ b/erpnext/docs/user/manual/en/setting-up/company-setup.md @@ -3,8 +3,8 @@ business, under Domain. You can enter manufacturing, retail, or services depending on the nature of your business activity. If you have more than one companies, create the setup under the Company Setup page. -After clicking on Setup, go to Masters and click on Company. +After clicking on Accounts and click on Company. -> Setup > Masters > Company > New Company +> Accounts > Company > New Company {next} diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/__init__.py b/erpnext/docs/user/manual/en/setting-up/feedback/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/index.md b/erpnext/docs/user/manual/en/setting-up/feedback/index.md new file mode 100644 index 00000000000..bb2efaffc53 --- /dev/null +++ b/erpnext/docs/user/manual/en/setting-up/feedback/index.md @@ -0,0 +1,7 @@ +# Feedback + +Customer/User Feedback for a Product or Services can be useful for business as it can be used to make decisions for improvements either in products or services. + +### Topics + +{index} diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/index.txt b/erpnext/docs/user/manual/en/setting-up/feedback/index.txt new file mode 100644 index 00000000000..08160ccd71e --- /dev/null +++ b/erpnext/docs/user/manual/en/setting-up/feedback/index.txt @@ -0,0 +1,4 @@ +setting-up-feedback +submit-feedback +resend-feedback-request +manual-feedback-request diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/manual-feedback-request.md b/erpnext/docs/user/manual/en/setting-up/feedback/manual-feedback-request.md new file mode 100644 index 00000000000..4afaee1fed5 --- /dev/null +++ b/erpnext/docs/user/manual/en/setting-up/feedback/manual-feedback-request.md @@ -0,0 +1,17 @@ +# Manual Feedback Request + +We can also send the feedback request to Customer/User without configuring the +Feedback Trigger. + +To request a feedback manually go to respective document e.g. Sales Order, Issue etc. +and click on Ask a Feedback option in Menu. + +Setting Condition + +Then, user can enter the feedback request details like email id, message and send the +feedback request mail. + +Setting Condition + +Note. If Feedback Trigger is already configured for the document then system will fetch +Feedback Request details (email id, message) diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/resend-feedback-request.md b/erpnext/docs/user/manual/en/setting-up/feedback/resend-feedback-request.md new file mode 100644 index 00000000000..0dbb3b7340b --- /dev/null +++ b/erpnext/docs/user/manual/en/setting-up/feedback/resend-feedback-request.md @@ -0,0 +1,16 @@ +# Resend Feedback Request + +We can also Resend the Feedback Request to the Customer/User. + +Setting Condition + +To resend the Feedback Request we will need to navigate the Communication by clicking the `Details` link on Timeline Feedback. + +Setting Condition + +On Resend Button click a dialog with the Feedback Request message will appear user can either send the +Feedback Request with same message or he/she can make the changes in the Feedback Request message. + +Setting Condition + +{next} diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/setting-up-feedback.md b/erpnext/docs/user/manual/en/setting-up/feedback/setting-up-feedback.md new file mode 100644 index 00000000000..373d7032753 --- /dev/null +++ b/erpnext/docs/user/manual/en/setting-up/feedback/setting-up-feedback.md @@ -0,0 +1,53 @@ +# Feedback Trigger + +You can set up the Feedback Trigger for various documents to get the Feedback from the user. + +For this, you will need to setup the Feedback Trigger, + +> Setup > Email > Feedback Trigger + +### Setting Up Feedback Trigger + +To Setup an Feedback: + +1. Select which Document Type you want to send feedback request mail. +2. Select the Email Field, This field will be used to get the recipients email id. +3. Set the Subject for feedback request mail. +4. Set the conditions, if all the conditions are met only then the feedback request mail will be sent. +5. Compose the message. + +### Setting a Subject +You can retrieve the data for a particular field by using `doc.[field_name]`. To use it in your subject/message, you have to surround it with `{% raw %}{{ }}{% endraw %}`. These are called [Jinja](http://jinja.pocoo.org/) tags. So, for example, to get the name of a document, you use `{% raw %}{{ doc.name }}{% endraw %}`. The below example sends an feedback request whenever Issue is Closed with the Subject, "ISS-##### Issue is Resolved" + +Setting Subject + +### Setting Conditions + +Feedback Trigger allows you to set conditions according to the field data in your documents. The feedback request email will be sent on document save only if the all conditions are true For example if you want to trigger the feedback request mail to a customer if an Issue is has been saved as "Closed" as it's status, you put `doc.status == "Closed"` in the conditions textbox. You can also set more complex conditions by combining them. + +Setting Condition + +### Setting a Message + +You can use both Jinja Tags (`{% raw %}{{ doc.[field_name] }}{% endraw %}`) and HTML tags in the message textbox. + + {% raw %}

Your Support Ticket is Resolved

+ +

Issue {{ doc.name }} Is resolved. Please check and confirm the same.

+

Your Feedback is important for us. Please give us your Feedback for {{ doc.name }}

+

Please visit the following url for feedback.

+ + {{ feedback_url }} + {% endraw %} + +--- + +### Example + +1. Setting up Feedback Trigger + Defining Criteria + +1. Setting the Recipients and Message + Set Message + +{next} diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/submit-feedback.md b/erpnext/docs/user/manual/en/setting-up/feedback/submit-feedback.md new file mode 100644 index 00000000000..9069f3721b5 --- /dev/null +++ b/erpnext/docs/user/manual/en/setting-up/feedback/submit-feedback.md @@ -0,0 +1,19 @@ +# Submit Feedback + +Once feedback request mail is sent the user/customer. He/She can visit the URL to submit the feedback +as well as rating for the document. + +Setting Condition + +Once Feedback is submitted the feedback details message and ratings will be recorded and will be shown on Document sidebar and timeline. Also once the Feedback is successfully submitted by the user the link shared to the user will be expired and can not be used to submit the Feedback again. + +On Document sidebar the latest feedback ratings will displayed. + +Setting Condition + +Also, The Feedback details such as Feedback message and ratings will be shown in the Document's Timeline along +with Comment, Email. + +Setting Condition + +{next} \ No newline at end of file diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 14ea74b70b5..617e6c33016 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -28,6 +28,7 @@ after_install = "erpnext.setup.install.after_install" boot_session = "erpnext.startup.boot.boot_session" notification_config = "erpnext.startup.notifications.get_notification_config" +get_help_messages = "erpnext.utilities.activation.get_help_messages" on_session_creation = "erpnext.shopping_cart.utils.set_cart_count" on_logout = "erpnext.shopping_cart.utils.clear_cart_count" @@ -44,7 +45,7 @@ calendars = ["Task", "Production Order", "Leave Application", "Sales Order", "Ho fixtures = ["Web Form"] -website_generators = ["Item Group", "Item", "Sales Partner", "Job Opening", "Student Admission"] +website_generators = ["Item Group", "Item", "BOM", "Sales Partner", "Job Opening", "Student Admission"] website_context = { "favicon": "/assets/erpnext/images/favicon.png", @@ -96,6 +97,7 @@ website_route_rules = [ }, {"from_route": "/jobs", "to_route": "Job Opening"}, {"from_route": "/admissions", "to_route": "Student Admission"}, + {"from_route": "/boms", "to_route": "BOM"} ] portal_menu_items = [ @@ -164,6 +166,7 @@ scheduler_events = { "erpnext.stock.reorder_item.reorder_item", "erpnext.setup.doctype.email_digest.email_digest.send", "erpnext.support.doctype.issue.issue.auto_close_tickets", + "erpnext.crm.doctype.opportunity.opportunity.auto_close_opportunity", "erpnext.controllers.accounts_controller.update_invoice_status", "erpnext.accounts.doctype.fiscal_year.fiscal_year.auto_create_fiscal_year", "erpnext.hr.doctype.employee.employee.send_birthday_reminders", diff --git a/erpnext/hr/doctype/appraisal/appraisal.json b/erpnext/hr/doctype/appraisal/appraisal.json index 09065579df5..5a557da26c8 100644 --- a/erpnext/hr/doctype/appraisal/appraisal.json +++ b/erpnext/hr/doctype/appraisal/appraisal.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -80,6 +82,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Appraisal Template", @@ -111,7 +114,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 1, "label": "For Employee", @@ -142,7 +146,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "For Employee Name", @@ -173,6 +178,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -202,7 +208,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Status", @@ -233,7 +240,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Start Date", @@ -263,7 +271,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "End Date", @@ -294,6 +303,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Goals", @@ -323,6 +333,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Goals", @@ -337,7 +348,7 @@ "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, - "reqd": 1, + "reqd": 0, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -353,6 +364,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Calculate Total Score", @@ -382,6 +394,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Total Score (Out of 5)", @@ -412,6 +425,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -439,6 +453,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Remarks", @@ -467,6 +482,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -493,7 +509,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -524,6 +541,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -551,6 +569,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -583,7 +602,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:47:32.082712", + "modified": "2017-02-17 16:55:49.559295", "modified_by": "Administrator", "module": "HR", "name": "Appraisal", @@ -599,7 +618,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -620,7 +638,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -641,7 +658,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -657,9 +673,11 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "status, employee, employee_name", + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "employee", "title_field": "employee_name", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/appraisal/appraisal.py b/erpnext/hr/doctype/appraisal/appraisal.py index df6d770941e..e69dfa8bfe6 100644 --- a/erpnext/hr/doctype/appraisal/appraisal.py +++ b/erpnext/hr/doctype/appraisal/appraisal.py @@ -16,6 +16,9 @@ class Appraisal(Document): if not self.status: self.status = "Draft" + if not self.goals: + frappe.throw(_("Goals cannot be empty")) + set_employee_name(self) self.validate_dates() self.validate_existing_appraisal() diff --git a/erpnext/hr/doctype/attendance/attendance.json b/erpnext/hr/doctype/attendance/attendance.json index 9bbb3e5830e..d142f80028f 100644 --- a/erpnext/hr/doctype/attendance/attendance.json +++ b/erpnext/hr/doctype/attendance/attendance.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -80,7 +82,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 1, "label": "Employee", @@ -111,6 +114,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Name", @@ -140,7 +144,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Status", @@ -172,6 +177,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Leave Type", @@ -202,6 +208,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -229,7 +236,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Attendance Date", @@ -258,7 +266,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -289,6 +298,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -318,7 +328,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-01-12 16:09:27.301839", + "modified": "2017-02-17 16:55:33.866723", "modified_by": "Administrator", "module": "HR", "name": "Attendance", @@ -334,7 +344,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -355,7 +364,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -376,7 +384,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -392,6 +399,7 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "employee, employee_name, attendance_date, status", + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "title_field": "employee_name", diff --git a/erpnext/hr/doctype/department/department.json b/erpnext/hr/doctype/department/department.json index e19f175ecef..2f4f20d3f7b 100644 --- a/erpnext/hr/doctype/department/department.json +++ b/erpnext/hr/doctype/department/department.json @@ -15,13 +15,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "department_name", "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Department", "length": 0, "no_copy": 0, @@ -31,6 +34,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -41,6 +45,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "description": "Days for which Holidays are blocked for this department.", "fieldname": "leave_block_list", "fieldtype": "Link", @@ -48,7 +53,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Leave Block List", "length": 0, "no_copy": 0, @@ -57,6 +64,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -75,7 +83,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-08-01 12:44:43.338689", + "modified": "2017-02-17 16:55:19.875594", "modified_by": "Administrator", "module": "HR", "name": "Department", @@ -125,6 +133,8 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_order": "ASC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/designation/designation.json b/erpnext/hr/doctype/designation/designation.json index 1e7019602be..9315cfd6b82 100644 --- a/erpnext/hr/doctype/designation/designation.json +++ b/erpnext/hr/doctype/designation/designation.json @@ -9,18 +9,22 @@ "docstatus": 0, "doctype": "DocType", "document_type": "Setup", + "editable_grid": 0, "fields": [ { "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "designation_name", "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Designation", "length": 0, "no_copy": 0, @@ -30,6 +34,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -40,13 +45,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "description", "fieldtype": "Text", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -55,6 +63,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -66,13 +75,14 @@ "hide_toolbar": 0, "icon": "fa fa-bookmark", "idx": 1, + "image_view": 0, "in_create": 0, "in_dialog": 0, "is_submittable": 0, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-06-01 12:52:03.787578", + "modified": "2017-02-17 16:53:43.895882", "modified_by": "Administrator", "module": "HR", "name": "Designation", @@ -102,6 +112,8 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_order": "ASC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/employee/employee.json b/erpnext/hr/doctype/employee/employee.json index 4efba601d9a..80e484d6617 100644 --- a/erpnext/hr/doctype/employee/employee.json +++ b/erpnext/hr/doctype/employee/employee.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee", @@ -77,6 +79,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -107,6 +110,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Salutation", @@ -137,6 +141,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 0, "label": "Full Name", @@ -165,7 +170,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -195,6 +201,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "User ID", @@ -224,6 +231,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Create User", @@ -252,6 +260,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Image", @@ -280,6 +289,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -306,7 +316,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Number", @@ -336,6 +347,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Date of Joining", @@ -365,7 +377,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Date of Birth", @@ -394,7 +407,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Gender", @@ -425,6 +439,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employment Details", @@ -452,7 +467,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Status", @@ -482,7 +498,8 @@ "hidden": 0, "ignore_user_permissions": 1, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employment Type", @@ -514,6 +531,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Holiday List", @@ -544,6 +562,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -569,7 +588,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Offer Date", @@ -599,6 +619,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Confirmation Date", @@ -627,7 +648,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contract End Date", @@ -657,6 +679,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Date Of Retirement", @@ -686,6 +709,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Job Profile", @@ -712,7 +736,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Branch", @@ -742,7 +767,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Department", @@ -772,7 +798,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 0, "label": "Designation", @@ -803,7 +830,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company Email", @@ -834,6 +862,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Notice (days)", @@ -863,6 +892,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Salary Information", @@ -892,6 +922,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Salary Mode", @@ -922,7 +953,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Bank Name", @@ -953,6 +985,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Bank A/C No.", @@ -982,6 +1015,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Organization Profile", @@ -1009,6 +1043,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reports to", @@ -1040,6 +1075,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Leave Approvers", @@ -1068,6 +1104,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Details", @@ -1096,6 +1133,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Prefered Contact Email", @@ -1125,6 +1163,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Prefered Email", @@ -1154,6 +1193,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Cell Number", @@ -1181,6 +1221,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Personal Email", @@ -1209,6 +1250,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Unsubscribed", @@ -1236,6 +1278,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Emergency Contact", @@ -1263,6 +1306,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Relation", @@ -1290,6 +1334,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Emergency Phone", @@ -1317,6 +1362,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1344,6 +1390,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Permanent Address Is", @@ -1372,6 +1419,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Permanent Address", @@ -1399,6 +1447,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Current Address Is", @@ -1427,6 +1476,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Current Address", @@ -1454,6 +1504,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -1482,6 +1533,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Bio", @@ -1509,6 +1561,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Personal Details", @@ -1536,6 +1589,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Passport Number", @@ -1563,6 +1617,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Date of Issue", @@ -1590,6 +1645,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Valid Upto", @@ -1617,6 +1673,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Place of Issue", @@ -1644,6 +1701,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1671,6 +1729,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Marital Status", @@ -1699,6 +1758,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Blood Group", @@ -1728,6 +1788,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Family Background", @@ -1756,6 +1817,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Health Details", @@ -1783,6 +1845,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Educational Qualification", @@ -1810,6 +1873,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Education", @@ -1838,6 +1902,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Previous Work Experience", @@ -1866,6 +1931,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "External Work History", @@ -1894,6 +1960,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "History In Company", @@ -1922,6 +1989,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Internal Work History", @@ -1950,6 +2018,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Exit", @@ -1978,6 +2047,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Resignation Letter Date", @@ -2006,7 +2076,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Relieving Date", @@ -2036,6 +2107,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reason for Leaving", @@ -2065,6 +2137,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Leave Encashed?", @@ -2095,6 +2168,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Encashment Date", @@ -2124,6 +2198,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Exit Interview Details", @@ -2154,6 +2229,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Held On", @@ -2183,6 +2259,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reason for Resignation", @@ -2213,6 +2290,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "New Workplace", @@ -2242,6 +2320,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Feedback", @@ -2273,7 +2352,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-12-19 17:24:22.941738", + "modified": "2017-02-17 16:56:25.571268", "modified_by": "Administrator", "module": "HR", "name": "Employee", @@ -2289,7 +2368,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -2310,7 +2388,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -2332,7 +2409,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -2348,8 +2424,10 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "employee_name", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "title_field": "employee_name", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/employee_loan/employee_loan.js b/erpnext/hr/doctype/employee_loan/employee_loan.js index a03dbda4b15..cb9216f7419 100644 --- a/erpnext/hr/doctype/employee_loan/employee_loan.js +++ b/erpnext/hr/doctype/employee_loan/employee_loan.js @@ -12,6 +12,16 @@ frappe.ui.form.on('Employee Loan', { } }; }); + + frm.set_query("interest_income_account", function() { + return { + "filters": { + "company": frm.doc.company, + "root_type": "Income", + "is_group": 0 + } + }; + }); $.each(["payment_account", "employee_loan_account"], function(i, field) { frm.set_query(field, function() { diff --git a/erpnext/hr/doctype/employee_loan/employee_loan.json b/erpnext/hr/doctype/employee_loan/employee_loan.json index 560515fde99..c052dc028b5 100644 --- a/erpnext/hr/doctype/employee_loan/employee_loan.json +++ b/erpnext/hr/doctype/employee_loan/employee_loan.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee", @@ -52,6 +53,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Name", @@ -81,6 +83,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Loan Application", @@ -110,6 +113,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Loan Type", @@ -139,6 +143,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -167,6 +172,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Posting Date", @@ -194,7 +200,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -224,6 +231,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Status", @@ -253,6 +261,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Repay from Salary", @@ -281,6 +290,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Loan Details", @@ -309,6 +319,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Loan Amount", @@ -338,6 +349,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rate of Interest (%) / Year", @@ -367,6 +379,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Disbursement Date", @@ -395,6 +408,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -423,6 +437,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Repayment Method", @@ -454,6 +469,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Repayment Period in Months", @@ -484,9 +500,10 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Repayment Amount", + "label": "Monthly Repayment Amount", "length": 0, "no_copy": 0, "permlevel": 0, @@ -512,6 +529,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Account Info", @@ -540,6 +558,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mode of Payment", @@ -569,6 +588,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment Account", @@ -598,6 +618,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -625,6 +646,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Loan Account", @@ -643,6 +665,36 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "interest_income_account", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Interest Income Account", + "length": 0, + "no_copy": 0, + "options": "Account", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -654,6 +706,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Repayment Schedule", @@ -682,6 +735,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Repayment Schedule", @@ -711,6 +765,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Totals", @@ -740,6 +795,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Payment", @@ -768,6 +824,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -796,6 +853,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Interest Payable", @@ -824,6 +882,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -852,7 +911,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-01-17 07:13:10.704520", + "modified": "2017-02-22 04:27:13.174800", "modified_by": "Administrator", "module": "HR", "name": "Employee Loan", @@ -869,7 +928,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -885,6 +943,7 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "posting_date", + "show_name_in_global_search": 0, "sort_field": "creation", "sort_order": "DESC", "track_changes": 1, diff --git a/erpnext/hr/doctype/employee_loan_application/employee_loan_application.js b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.js index 6958beabfa7..33b620bc66e 100644 --- a/erpnext/hr/doctype/employee_loan_application/employee_loan_application.js +++ b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.js @@ -4,13 +4,33 @@ frappe.ui.form.on('Employee Loan Application', { refresh: function(frm) { frm.trigger("toggle_fields") + frm.trigger("add_toolbar_buttons") }, repayment_method: function(frm) { + frm.doc.repayment_amount = frm.doc.repayment_periods = "" frm.trigger("toggle_fields") }, - toggle_fields: function(frm) { frm.toggle_enable("repayment_amount", frm.doc.repayment_method=="Repay Fixed Amount per Period") frm.toggle_enable("repayment_periods", frm.doc.repayment_method=="Repay Over Number of Periods") + }, + add_toolbar_buttons: function(frm) { + if (frm.doc.status == "Approved") { + frm.add_custom_button(__('Employee Loan'), function() { + frappe.call({ + type: "GET", + method: "erpnext.hr.doctype.employee_loan_application.employee_loan_application.make_employee_loan", + args: { + "source_name": frm.doc.name + }, + callback: function(r) { + if(!r.exc) { + var doc = frappe.model.sync(r.message); + frappe.set_route("Form", r.message.doctype, r.message.name); + } + } + }); + }) + } } }); diff --git a/erpnext/hr/doctype/employee_loan_application/employee_loan_application.json b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.json index e30dc5a0012..29617dd059b 100644 --- a/erpnext/hr/doctype/employee_loan_application/employee_loan_application.json +++ b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.json @@ -24,6 +24,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Posting Date", @@ -52,6 +53,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee", @@ -80,7 +82,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Name", @@ -110,6 +113,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -137,13 +141,14 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Status", "length": 0, - "no_copy": 0, + "no_copy": 1, "options": "Open\nApproved\nRejected", - "permlevel": 0, + "permlevel": 1, "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, @@ -166,6 +171,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -195,6 +201,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Loan Info", @@ -223,6 +230,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Loan Type", @@ -252,6 +260,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Loan Amount", @@ -280,6 +289,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Required by Date", @@ -308,6 +318,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -335,6 +346,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reason", @@ -363,6 +375,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Repayment Info", @@ -391,6 +404,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Repayment Method", @@ -420,6 +434,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rate of Interest", @@ -449,6 +464,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Payable Interest", @@ -477,6 +493,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -505,9 +522,10 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Repayment Amount", + "label": "Monthly Repayment Amount", "length": 0, "no_copy": 0, "permlevel": 0, @@ -534,6 +552,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Repayment Period in Months", @@ -562,6 +581,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Payable Amount", @@ -590,6 +610,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -618,7 +639,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-01-09 12:02:36.562577", + "modified": "2017-02-27 04:52:39.344524", "modified_by": "Administrator", "module": "HR", "name": "Employee Loan Application", @@ -635,7 +656,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -656,7 +676,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -666,12 +685,53 @@ "share": 1, "submit": 1, "write": 1 + }, + { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + }, + { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Employee", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 0 } ], "quick_entry": 0, "read_only": 0, "read_only_onload": 0, "search_fields": "employee, employee_name, loan_type, loan_amount", + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "employee", diff --git a/erpnext/hr/doctype/employee_loan_application/employee_loan_application.py b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.py index 15dbd4e5e40..74a65e2b571 100644 --- a/erpnext/hr/doctype/employee_loan_application/employee_loan_application.py +++ b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.py @@ -6,6 +6,7 @@ from __future__ import unicode_literals import frappe, math from frappe import _ from frappe.utils import flt +from frappe.model.mapper import get_mapped_doc from frappe.model.document import Document from erpnext.hr.doctype.employee_loan.employee_loan import get_monthly_repayment_amount, check_repayment_method @@ -18,7 +19,7 @@ class EmployeeLoanApplication(Document): def validate_loan_amount(self): maximum_loan_limit = frappe.db.get_value('Loan Type', self.loan_type, 'maximum_loan_amount') - if self.loan_amount > maximum_loan_limit: + if maximum_loan_limit and self.loan_amount > maximum_loan_limit: frappe.throw(_("Loan Amount cannot exceed Maximum Loan Amount of {0}").format(maximum_loan_limit)) def get_repayment_details(self): @@ -31,4 +32,17 @@ class EmployeeLoanApplication(Document): (self.loan_amount*monthly_interest_rate)))/(math.log(1+monthly_interest_rate))) self.total_payable_amount = self.repayment_amount * self.repayment_periods - self.total_payable_interest = self.total_payable_amount - self.loan_amount \ No newline at end of file + self.total_payable_interest = self.total_payable_amount - self.loan_amount + +@frappe.whitelist() +def make_employee_loan(source_name, target_doc = None): + doclist = get_mapped_doc("Employee Loan Application", source_name, { + "Employee Loan Application": { + "doctype": "Employee Loan", + "validation": { + "docstatus": ["=", 1] + } + } + }, target_doc) + + return doclist \ No newline at end of file diff --git a/erpnext/hr/doctype/employment_type/employment_type.json b/erpnext/hr/doctype/employment_type/employment_type.json index 6963be2a553..da84ce43f38 100644 --- a/erpnext/hr/doctype/employment_type/employment_type.json +++ b/erpnext/hr/doctype/employment_type/employment_type.json @@ -15,13 +15,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "employee_type_name", "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Employment Type", "length": 0, "no_copy": 0, @@ -31,6 +34,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -49,7 +53,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-07-22 05:34:43.238512", + "modified": "2017-02-17 16:51:15.218646", "modified_by": "Administrator", "module": "HR", "name": "Employment Type", @@ -99,6 +103,8 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.json b/erpnext/hr/doctype/expense_claim/expense_claim.json index f517b91d78e..052284d2475 100644 --- a/erpnext/hr/doctype/expense_claim/expense_claim.json +++ b/erpnext/hr/doctype/expense_claim/expense_claim.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -52,6 +53,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Paid", @@ -81,7 +83,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Approval Status", @@ -113,6 +116,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Approver", @@ -144,6 +148,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -172,6 +177,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Total Claimed Amount", @@ -203,6 +209,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Total Sanctioned Amount", @@ -234,6 +241,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -262,6 +270,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Expenses", @@ -292,6 +301,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -319,7 +329,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Posting Date", @@ -348,7 +359,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "From Employee", @@ -378,7 +390,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Name", @@ -409,6 +422,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Vehicle Log", @@ -438,6 +452,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Project", @@ -467,6 +482,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Task", @@ -496,6 +512,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -522,6 +539,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Total Amount Reimbursed", @@ -551,6 +569,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Remark", @@ -581,6 +600,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Title", @@ -609,6 +629,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employees Email Id", @@ -638,6 +659,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Accounting Details", @@ -665,7 +687,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -697,6 +720,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mode of Payment", @@ -726,6 +750,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -754,6 +779,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payable Account", @@ -783,6 +809,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employees Email Address", @@ -812,6 +839,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "More Details", @@ -840,7 +868,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Status", @@ -870,6 +899,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -903,7 +933,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-01-19 18:15:35.968292", + "modified": "2017-02-17 16:52:25.682739", "modified_by": "Administrator", "module": "HR", "name": "Expense Claim", @@ -998,6 +1028,7 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "approval_status,employee,employee_name", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "employee", diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js index 507d070444b..3cc8dd5036f 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js +++ b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js @@ -3,8 +3,8 @@ frappe.views.calendar["Holiday List"] = { field_map: { - "start": "from_date", - "end": "to_date", + "start": "holiday_date", + "end": "holiday_date", "id": "name", "title": "description", "allDay": "allDay" diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.json b/erpnext/hr/doctype/job_applicant/job_applicant.json index 3675e5b06bc..2a97f2804b7 100644 --- a/erpnext/hr/doctype/job_applicant/job_applicant.json +++ b/erpnext/hr/doctype/job_applicant/job_applicant.json @@ -24,6 +24,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Applicant Name", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Email Address", @@ -79,6 +81,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Status", @@ -107,6 +110,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -134,6 +138,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Job Opening", @@ -162,6 +167,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -189,6 +195,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Cover Letter", @@ -217,6 +224,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Resume Attachment", @@ -246,7 +254,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:29:24.405606", + "modified": "2017-02-17 16:51:55.976529", "modified_by": "Administrator", "module": "HR", "name": "Job Applicant", @@ -262,7 +270,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -278,7 +285,9 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "applicant_name", + "show_name_in_global_search": 0, "sort_order": "ASC", "title_field": "applicant_name", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.json b/erpnext/hr/doctype/leave_allocation/leave_allocation.json index e984bfc95bf..f2ed76668e5 100644 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation.json +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -78,7 +80,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 1, "label": "Employee", @@ -108,7 +111,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 0, "label": "Employee Name", @@ -136,6 +140,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -163,6 +168,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Description", @@ -193,6 +199,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -219,7 +226,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Leave Type", @@ -250,6 +258,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "From Date", @@ -278,6 +287,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "To Date", @@ -306,6 +316,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -333,6 +344,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "New Leaves Allocated", @@ -361,6 +373,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Add unused leaves from previous allocations", @@ -389,6 +402,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Unused leaves", @@ -416,6 +430,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Leaves Allocated", @@ -443,6 +458,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -474,7 +490,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:26:00.812083", + "modified": "2017-02-17 16:51:05.744921", "modified_by": "Administrator", "module": "HR", "name": "Leave Allocation", @@ -490,7 +506,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -511,7 +526,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -527,8 +541,10 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "employee,employee_name,leave_type,total_leaves_allocated", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "employee", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js index 79c6d959c0b..3bf41bb3411 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.js +++ b/erpnext/hr/doctype/leave_application/leave_application.js @@ -23,6 +23,10 @@ frappe.ui.form.on("Leave Application", { }, + validate: function(frm) { + frm.toggle_reqd("half_day_date", frm.doc.half_day == 1); + }, + refresh: function(frm) { if (frm.is_new()) { frm.set_value("status", "Open"); @@ -45,28 +49,38 @@ frappe.ui.form.on("Leave Application", { }, half_day: function(frm) { - if (frm.doc.from_date) { - frm.set_value("to_date", frm.doc.from_date); - frm.trigger("calculate_total_days"); + if (frm.doc.from_date == frm.doc.to_date) { + frm.set_value("half_day_date", frm.doc.from_date); } + else { + frm.trigger("half_day_datepicker"); + } + frm.trigger("calculate_total_days"); }, from_date: function(frm) { - if (cint(frm.doc.half_day)==1) { - frm.set_value("to_date", frm.doc.from_date); - } + frm.trigger("half_day_datepicker"); frm.trigger("calculate_total_days"); }, to_date: function(frm) { - if (cint(frm.doc.half_day)==1 && cstr(frm.doc.from_date) && frm.doc.from_date != frm.doc.to_date) { - msgprint(__("To Date should be same as From Date for Half Day leave")); - frm.set_value("to_date", frm.doc.from_date); - } - + frm.trigger("half_day_datepicker"); frm.trigger("calculate_total_days"); }, + half_day_date(frm) { + frm.trigger("calculate_total_days"); + }, + + half_day_datepicker: function(frm) { + frm.set_value('half_day_date', ''); + var half_day_datepicker = frm.fields_dict.half_day_date.datepicker; + half_day_datepicker.update({ + minDate: frappe.datetime.str_to_obj(frm.doc.from_date), + maxDate: frappe.datetime.str_to_obj(frm.doc.to_date) + }) + }, + get_leave_balance: function(frm) { if(frm.doc.docstatus==0 && frm.doc.employee && frm.doc.leave_type && frm.doc.from_date) { return frappe.call({ @@ -87,29 +101,25 @@ frappe.ui.form.on("Leave Application", { }, calculate_total_days: function(frm) { - if(frm.doc.from_date && frm.doc.to_date) { - if (cint(frm.doc.half_day)==1) { - frm.set_value("total_leave_days", 0.5); - } else if (frm.doc.employee && frm.doc.leave_type){ + if(frm.doc.from_date && frm.doc.to_date && frm.doc.employee && frm.doc.leave_type) { // server call is done to include holidays in leave days calculations - return frappe.call({ - method: 'erpnext.hr.doctype.leave_application.leave_application.get_number_of_leave_days', - args: { - "employee": frm.doc.employee, - "leave_type": frm.doc.leave_type, - "from_date": frm.doc.from_date, - "to_date": frm.doc.to_date, - "half_day": frm.doc.half_day - }, - callback: function(r) { - if (r && r.message) { - frm.set_value('total_leave_days', r.message); - frm.trigger("get_leave_balance"); - } + return frappe.call({ + method: 'erpnext.hr.doctype.leave_application.leave_application.get_number_of_leave_days', + args: { + "employee": frm.doc.employee, + "leave_type": frm.doc.leave_type, + "from_date": frm.doc.from_date, + "to_date": frm.doc.to_date, + "half_day": frm.doc.half_day, + "half_day_date": frm.doc.half_day_date, + }, + callback: function(r) { + if (r && r.message) { + frm.set_value('total_leave_days', r.message); + frm.trigger("get_leave_balance"); } - }); - } + } + }); } }, - }); diff --git a/erpnext/hr/doctype/leave_application/leave_application.json b/erpnext/hr/doctype/leave_application/leave_application.json index 0f63ec36ac3..ca69417a799 100644 --- a/erpnext/hr/doctype/leave_application/leave_application.json +++ b/erpnext/hr/doctype/leave_application/leave_application.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -53,6 +54,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Status", @@ -81,6 +83,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -107,7 +110,8 @@ "hidden": 0, "ignore_user_permissions": 1, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Leave Type", @@ -136,6 +140,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Leave Balance Before Application", @@ -163,6 +168,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -190,6 +196,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "From Date", @@ -217,6 +224,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "To Date", @@ -244,6 +252,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Half Day", @@ -260,6 +269,36 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.half_day && (doc.from_date != doc.to_date)", + "fieldname": "half_day_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Half Day Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -271,12 +310,14 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Total Leave Days", "length": 0, "no_copy": 1, "permlevel": 0, + "precision": "1", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, @@ -298,6 +339,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -326,6 +368,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Reason", @@ -353,6 +396,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -379,7 +423,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 1, "label": "Employee", @@ -407,7 +452,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Name", @@ -435,6 +481,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -463,6 +510,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Leave Approver", @@ -491,6 +539,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Leave Approver Name", @@ -519,6 +568,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -547,6 +597,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Posting Date", @@ -575,6 +626,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Follow via Email", @@ -602,6 +654,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -628,6 +681,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -656,6 +710,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Letter Head", @@ -684,6 +739,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -713,7 +769,7 @@ "issingle": 0, "istable": 0, "max_attachments": 3, - "modified": "2016-12-15 14:48:14.552415", + "modified": "2017-02-24 07:33:08.907824", "modified_by": "Administrator", "module": "HR", "name": "Leave Application", @@ -729,7 +785,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -751,7 +806,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -772,7 +826,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -793,7 +846,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -815,7 +867,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -837,7 +888,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -858,7 +908,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -874,9 +923,11 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "employee,employee_name,leave_type,from_date,to_date,total_leave_days", + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "employee", "title_field": "employee_name", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index 5b565fa1def..c53c2309f44 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -25,7 +25,7 @@ class LeaveApplication(Document): def validate(self): if not getattr(self, "__islocal", None) and frappe.db.exists(self.doctype, self.name): - self.previous_doc = frappe.db.get_value(self.doctype, self.name, "*", as_dict=True) + self.previous_doc = frappe.get_value(self.doctype, self.name, "leave_approver", as_dict=True) else: self.previous_doc = None @@ -46,14 +46,10 @@ class LeaveApplication(Document): self.status == "Open" and self.previous_doc.leave_approver != self.leave_approver): # notify leave approver about creation self.notify_leave_approver() - elif self.previous_doc and \ - self.previous_doc.status == "Open" and self.status == "Rejected": - # notify employee about rejection - self.notify_employee(self.status) def on_submit(self): - if self.status != "Approved": - frappe.throw(_("Only Leave Applications with status 'Approved' can be submitted")) + if self.status == "Open": + frappe.throw(_("Only Leave Applications with status 'Approved' and 'Rejected' can be submitted")) self.validate_back_dated_application() @@ -67,7 +63,13 @@ class LeaveApplication(Document): def validate_dates(self): if self.from_date and self.to_date and (getdate(self.to_date) < getdate(self.from_date)): frappe.throw(_("To date cannot be before from date")) - + + if self.half_day and self.half_day_date \ + and (getdate(self.half_day_date) < getdate(self.from_date) + or getdate(self.half_day_date) > getdate(self.to_date)): + + frappe.throw(_("Half Day Date should be between From Date and To Date")) + if not is_lwp(self.leave_type): self.validate_dates_acorss_allocation() self.validate_back_dated_application() @@ -133,7 +135,7 @@ class LeaveApplication(Document): def validate_balance_leaves(self): if self.from_date and self.to_date: self.total_leave_days = get_number_of_leave_days(self.employee, self.leave_type, - self.from_date, self.to_date, self.half_day) + self.from_date, self.to_date, self.half_day, self.half_day_date) if self.total_leave_days == 0: frappe.throw(_("The day(s) on which you are applying for leave are holidays. You need not apply for leave.")) @@ -155,7 +157,9 @@ class LeaveApplication(Document): # hack! if name is null, it could cause problems with != self.name = "New Leave Application" - for d in frappe.db.sql("""select name, leave_type, posting_date, from_date, to_date, total_leave_days + for d in frappe.db.sql(""" + select + name, leave_type, posting_date, from_date, to_date, total_leave_days, half_day_date from `tabLeave Application` where employee = %(employee)s and docstatus < 2 and status in ("Open", "Approved") and to_date >= %(from_date)s and from_date <= %(to_date)s @@ -165,10 +169,14 @@ class LeaveApplication(Document): "to_date": self.to_date, "name": self.name }, as_dict = 1): - - if d['total_leave_days']==0.5 and cint(self.half_day)==1: - sum_leave_days = self.get_total_leaves_on_half_day() - if sum_leave_days==1: + + if cint(self.half_day)==1 and getdate(self.half_day_date) == getdate(d.half_day_date) and ( + flt(self.total_leave_days)==0.5 + or getdate(self.from_date) == getdate(d.to_date) + or getdate(self.to_date) == getdate(d.from_date)): + + total_leaves_on_half_day = self.get_total_leaves_on_half_day() + if total_leaves_on_half_day >= 1: self.throw_overlap_error(d) else: self.throw_overlap_error(d) @@ -180,18 +188,19 @@ class LeaveApplication(Document): frappe.throw(msg, OverlapError) def get_total_leaves_on_half_day(self): - return frappe.db.sql("""select sum(total_leave_days) from `tabLeave Application` + leave_count_on_half_day_date = frappe.db.sql("""select count(name) from `tabLeave Application` where employee = %(employee)s and docstatus < 2 and status in ("Open", "Approved") - and from_date = %(from_date)s - and to_date = %(to_date)s + and half_day = 1 + and half_day_date = %(half_day_date)s and name != %(name)s""", { "employee": self.employee, - "from_date": self.from_date, - "to_date": self.to_date, + "half_day_date": self.half_day_date, "name": self.name })[0][0] + + return leave_count_on_half_day_date * 0.5 def validate_max_days(self): max_days = frappe.db.get_value("Leave Type", self.leave_type, "max_days_allowed") @@ -234,13 +243,18 @@ class LeaveApplication(Document): else: name = self.name - return (_("Leave Application") + ": %s - %s") % (name, _(status)) + message = "Leave Application: {name}".format(name=name)+"
" + message += "Leave Type: {leave_type}".format(leave_type=self.leave_type)+"
" + message += "From Date: {from_date}".format(from_date=self.from_date)+"
" + message += "To Date: {to_date}".format(to_date=self.to_date)+"
" + message += "Status: {status}".format(status=_(status)) + return message self.notify({ # for post in messages "message": _get_message(url=True), "message_to": employee.user_id, - "subject": _get_message(), + "subject": (_("Leave Application") + ": %s - %s") % (self.name, _(status)) }) def notify_leave_approver(self): @@ -252,8 +266,12 @@ class LeaveApplication(Document): if url: name = get_link_to_form(self.doctype, self.name) employee_name = get_link_to_form("Employee", self.employee, label=employee_name) - - return (_("New Leave Application") + ": %s - " + _("Employee") + ": %s") % (name, employee_name) + message = (_("Leave Application") + ": %s") % (name)+"
" + message += (_("Employee") + ": %s") % (employee_name)+"
" + message += (_("Leave Type") + ": %s") % (self.leave_type)+"
" + message += (_("From Date") + ": %s") % (self.from_date)+"
" + message += (_("To Date") + ": %s") % (self.to_date) + return message self.notify({ # for post in messages @@ -261,7 +279,7 @@ class LeaveApplication(Document): "message_to": self.leave_approver, # for email - "subject": _get_message() + "subject": (_("New Leave Application") + ": %s - " + _("Employee") + ": %s") % (self.name, cstr(employee.employee_name)) }) def notify(self, args): @@ -289,13 +307,18 @@ def get_approvers(doctype, txt, searchfield, start, page_len, filters): return approvers_list @frappe.whitelist() -def get_number_of_leave_days(employee, leave_type, from_date, to_date, half_day=None): - if half_day==1: - return 0.5 - number_of_days = date_diff(to_date, from_date) + 1 +def get_number_of_leave_days(employee, leave_type, from_date, to_date, half_day = None, half_day_date = None): + number_of_days = 0 + if half_day == 1: + if from_date == to_date: + number_of_days = 0.5 + else: + number_of_days = date_diff(to_date, from_date) + .5 + else: + number_of_days = date_diff(to_date, from_date) + 1 + if not frappe.db.get_value("Leave Type", leave_type, "include_holiday"): number_of_days = flt(number_of_days) - flt(get_holidays(employee, from_date, to_date)) - return number_of_days @frappe.whitelist() diff --git a/erpnext/hr/doctype/leave_application/test_leave_application.py b/erpnext/hr/doctype/leave_application/test_leave_application.py index 83fdd585091..f7a996b50b7 100644 --- a/erpnext/hr/doctype/leave_application/test_leave_application.py +++ b/erpnext/hr/doctype/leave_application/test_leave_application.py @@ -134,7 +134,7 @@ class TestLeaveApplication(unittest.TestCase): application.leave_approver = "test2@example.com" self.assertRaises(OverlapError, application.insert) - def test_overlap_with_half_day(self): + def test_overlap_with_half_day_1(self): self._clear_roles() self._clear_applications() @@ -146,25 +146,33 @@ class TestLeaveApplication(unittest.TestCase): make_allocation_record() - # allow second half-day on the same day if available + # leave from 1-5, half day on 3rd application = self.get_application(_test_records[0]) application.leave_approver = "test2@example.com" application.half_day = 1 + application.half_day_date = "2013-01-03" application.insert() - # allow second half-day on the same day if available + # Apply again for a half day leave on 3rd application = self.get_application(_test_records[0]) application.leave_approver = "test2@example.com" + application.from_date = "2013-01-03" + application.to_date = "2013-01-03" application.half_day = 1 + application.half_day_date = "2013-01-03" application.insert() + # Apply again for a half day leave on 3rd application = self.get_application(_test_records[0]) application.leave_approver = "test2@example.com" + application.from_date = "2013-01-03" + application.to_date = "2013-01-03" application.half_day = 1 + application.half_day_date = "2013-01-03" self.assertRaises(OverlapError, application.insert) - def test_overlap_with_half_day_not_applicable(self): + def test_overlap_with_half_day_2(self): self._clear_roles() self._clear_applications() @@ -176,17 +184,56 @@ class TestLeaveApplication(unittest.TestCase): make_allocation_record() - # allow second half-day on the same day if available + # leave from 1-5, no half day application = self.get_application(_test_records[0]) application.leave_approver = "test2@example.com" application.insert() - # allow second half-day on the same day if available + # Apply again for a half day leave on 1st application = self.get_application(_test_records[0]) application.leave_approver = "test2@example.com" application.half_day = 1 + application.half_day_date = application.from_date self.assertRaises(OverlapError, application.insert) + + def test_overlap_with_half_day_3(self): + self._clear_roles() + self._clear_applications() + + from frappe.utils.user import add_role + add_role("test@example.com", "Employee") + add_role("test2@example.com", "Leave Approver") + + frappe.set_user("test@example.com") + + make_allocation_record() + + # leave from 1-5, half day on 5th + application = self.get_application(_test_records[0]) + application.leave_approver = "test2@example.com" + application.half_day = 1 + application.half_day_date = "2013-01-05" + application.insert() + + # Apply leave from 4-7, half day on 5th + application = self.get_application(_test_records[0]) + application.leave_approver = "test2@example.com" + application.from_date = "2013-01-04" + application.to_date = "2013-01-07" + application.half_day = 1 + application.half_day_date = "2013-01-05" + + self.assertRaises(OverlapError, application.insert) + + # Apply leave from 5-7, half day on 5th + application = self.get_application(_test_records[0]) + application.leave_approver = "test2@example.com" + application.from_date = "2013-01-05" + application.to_date = "2013-01-07" + application.half_day = 1 + application.half_day_date = "2013-01-05" + application.insert() def test_global_block_list(self): self._clear_roles() diff --git a/erpnext/hr/doctype/loan_type/loan_type.json b/erpnext/hr/doctype/loan_type/loan_type.json index f9441ea1a28..3809fc15474 100644 --- a/erpnext/hr/doctype/loan_type/loan_type.json +++ b/erpnext/hr/doctype/loan_type/loan_type.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Loan Name", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Maximum Loan Amount", @@ -79,6 +81,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rate of Interest (%) Yearly", @@ -107,6 +110,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -135,6 +139,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Disabled", @@ -164,6 +169,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Description", @@ -192,7 +198,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-12-29 15:54:17.716285", + "modified": "2017-02-27 04:53:51.949600", "modified_by": "Administrator", "module": "HR", "name": "Loan Type", @@ -209,7 +215,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -224,7 +229,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/offer_letter/offer_letter.json b/erpnext/hr/doctype/offer_letter/offer_letter.json index b0a95c392f0..39352c26c33 100644 --- a/erpnext/hr/doctype/offer_letter/offer_letter.json +++ b/erpnext/hr/doctype/offer_letter/offer_letter.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Job Applicant", @@ -52,6 +53,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Applicant Name", @@ -81,6 +83,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -108,6 +111,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Status", @@ -138,6 +142,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Offer Date", @@ -166,6 +171,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Designation", @@ -195,6 +201,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -224,6 +231,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -251,6 +259,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Offer Letter Terms", @@ -280,6 +289,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -307,6 +317,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Select Terms and Conditions", @@ -336,6 +347,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Terms and Conditions", @@ -365,6 +377,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -393,7 +406,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:55:03.924272", + "modified": "2017-02-17 16:52:59.334325", "modified_by": "Administrator", "module": "HR", "name": "Offer Letter", @@ -410,7 +423,6 @@ "export": 1, "if_owner": 0, "import": 1, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -425,8 +437,10 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "title_field": "applicant_name", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.js b/erpnext/hr/doctype/process_payroll/process_payroll.js index cfb646d033f..e1bea622234 100644 --- a/erpnext/hr/doctype/process_payroll/process_payroll.js +++ b/erpnext/hr/doctype/process_payroll/process_payroll.js @@ -10,6 +10,34 @@ frappe.ui.form.on("Process Payroll", { frm.toggle_reqd(['payroll_frequency'], !frm.doc.salary_slip_based_on_timesheet); }, + setup: function(frm) { + frm.set_query("payment_account", function() { + var account_types = ["Bank", "Cash"]; + return { + filters: { + "account_type": ["in", account_types], + "is_group": 0, + "company": frm.doc.company + } + } + }), + frm.set_query("cost_center", function() { + return { + filters: { + "is_group": 0, + company: frm.doc.company + } + } + }), + frm.set_query("project", function() { + return { + filters: { + company: frm.doc.company + } + } + }) + }, + refresh: function(frm) { frm.disable_save(); }, @@ -51,16 +79,6 @@ frappe.ui.form.on("Process Payroll", { }) } }, - account: function(frm) { - var account_types = ["Bank", "Cash"]; - return { - filters: { - "account_type": ["in", account_types], - "is_group": 0, - "company": frm.doc.company - } - } - } }) cur_frm.cscript.display_activity_log = function(msg) { @@ -105,46 +123,18 @@ cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) { }); } -cur_frm.cscript.make_bank_entry = function(doc,cdt,cdn){ +cur_frm.cscript.make_bank_entry = function(doc, cdt, cdn){ if(doc.company && doc.start_date && doc.end_date){ - return cur_frm.cscript.reference_entry(doc,cdt,cdn); + return frappe.call({ + doc: cur_frm.doc, + method: "make_payment_entry", + callback: function(r) { + if (r.message) + var doc = frappe.model.sync(r.message)[0]; + frappe.set_route("Form", doc.doctype, doc.name); + } + }); } else { msgprint(__("Company, From Date and To Date is mandatory")); } -} - -cur_frm.cscript.reference_entry = function(doc,cdt,cdn){ - var dialog = new frappe.ui.Dialog({ - title: __("Bank Transaction Reference"), - fields: [ - { - "label": __("Reference Number"), - "fieldname": "reference_number", - "fieldtype": "Data", - "reqd": 1 - }, - { - "label": __("Reference Date"), - "fieldname": "reference_date", - "fieldtype": "Date", - "reqd": 1, - "default": get_today() - } - ] - }); - dialog.set_primary_action(__("Make"), function() { - args = dialog.get_values(); - if(!args) return; - dialog.hide(); - return frappe.call({ - doc: cur_frm.doc, - method: "make_journal_entry", - args: {"reference_number": args.reference_number, "reference_date":args.reference_date}, - callback: function(r) { - if (r.message) - cur_frm.cscript.display_activity_log(r.message); - } - }); - }); - dialog.show(); } \ No newline at end of file diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.json b/erpnext/hr/doctype/process_payroll/process_payroll.json index 7d84910efe2..2b847b3ea78 100644 --- a/erpnext/hr/doctype/process_payroll/process_payroll.json +++ b/erpnext/hr/doctype/process_payroll/process_payroll.json @@ -20,7 +20,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Select Employees", @@ -47,7 +46,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -75,7 +73,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Company", @@ -104,7 +101,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Posting Date", @@ -134,7 +130,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payroll Frequency", @@ -163,7 +158,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -190,7 +184,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Branch", @@ -218,7 +211,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Department", @@ -246,7 +238,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Designation", @@ -274,7 +265,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -301,7 +291,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Salary Slip Based on Timesheet", @@ -329,7 +318,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Select Payroll Period", @@ -358,7 +346,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Start Date", @@ -386,7 +373,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -414,7 +400,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "End Date", @@ -432,6 +417,115 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_16", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Accounts", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "cost_center", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Cost Center", + "length": 0, + "no_copy": 0, + "options": "Cost Center", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_18", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "project", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Project", + "length": 0, + "no_copy": 0, + "options": "Project", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -442,7 +536,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Process Payroll", @@ -470,7 +563,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -498,7 +590,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Create Salary Slip", @@ -525,7 +616,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -553,7 +643,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Submit Salary Slip", @@ -580,10 +669,9 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Account", + "label": "Payment Entry", "length": 0, "no_copy": 0, "permlevel": 0, @@ -609,7 +697,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment Account", @@ -640,7 +727,6 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Make Bank Entry", @@ -667,7 +753,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -693,7 +778,6 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Activity Log", @@ -722,7 +806,7 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2016-12-14 01:48:22.326326", + "modified": "2017-02-08 02:34:59.130475", "modified_by": "Administrator", "module": "HR", "name": "Process Payroll", @@ -738,7 +822,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -755,5 +838,6 @@ "read_only_onload": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.py b/erpnext/hr/doctype/process_payroll/process_payroll.py index 7bfde1ca182..561ddfcf09a 100644 --- a/erpnext/hr/doctype/process_payroll/process_payroll.py +++ b/erpnext/hr/doctype/process_payroll/process_payroll.py @@ -140,7 +140,7 @@ class ProcessPayroll(Document): Submit all salary slips based on selected criteria """ self.check_permission('write') - + jv_name = "" ss_list = self.get_sal_slip_list(ss_status=0) submitted_ss = [] not_submitted_ss = [] @@ -158,10 +158,12 @@ class ProcessPayroll(Document): submitted_ss.append(ss_dict) except frappe.ValidationError: not_submitted_ss.append(ss_dict) + if submitted_ss: + jv_name = self.make_accural_jv_entry() - return self.create_submit_log(submitted_ss, not_submitted_ss) + return self.create_submit_log(submitted_ss, not_submitted_ss, jv_name) - def create_submit_log(self, submitted_ss, not_submitted_ss): + def create_submit_log(self, submitted_ss, not_submitted_ss, jv_name): log = '' if not submitted_ss and not not_submitted_ss: log = "No salary slip found to submit for the above selected criteria" @@ -171,9 +173,12 @@ class ProcessPayroll(Document): dict(ss_list=submitted_ss, keys=sorted(submitted_ss[0].keys()), title=_('Submitted Salary Slips'))) + if jv_name: + log += "" + _("Accural Journal Entry Submitted") + "\ + %s" % '
''{0}'.format(jv_name) if not_submitted_ss: - log += frappe.render_template(self.get_log_template(), + log += frappe.render_template("templates/includes/salary_slip_log.html", dict(ss_list=not_submitted_ss, keys=sorted(not_submitted_ss[0].keys()), title=_('Not Submitted Salary Slips'))) @@ -188,17 +193,23 @@ class ProcessPayroll(Document): return ['{0}'.format(salary_slip)] - def get_total_salary(self): + def get_total_salary_and_loan_amounts(self): """ - Get total salary amount from submitted salary slip based on selected criteria + Get total loan principal, loan interest and salary amount from submitted salary slip based on selected criteria """ cond = self.get_filter_condition() - tot = frappe.db.sql(""" - select sum(rounded_total) from `tabSalary Slip` t1 + totals = frappe.db.sql(""" + select sum(principal_amount) as total_principal_amount, sum(interest_amount) as total_interest_amount, + sum(total_loan_repayment) as total_loan_repayment, sum(rounded_total) as rounded_total from `tabSalary Slip` t1 where t1.docstatus = 1 and start_date >= %s and end_date <= %s %s - """ % ('%s', '%s', cond), (self.start_date, self.end_date)) - - return flt(tot[0][0]) + """ % ('%s', '%s', cond), (self.start_date, self.end_date), as_dict=True) + return totals[0] + + def get_loan_accounts(self): + loan_accounts = frappe.get_all("Employee Loan", fields=["employee_loan_account", "interest_income_account"], + filters = {"company": self.company, "docstatus":1}) + if loan_accounts: + return loan_accounts[0] def get_salary_component_account(self, salary_component): account = frappe.db.get_value("Salary Component Account", @@ -233,18 +244,31 @@ class ProcessPayroll(Document): account = self.get_salary_component_account(s) account_dict[account] = account_dict.get(account, 0) + a return account_dict + + def get_default_payroll_payable_account(self): + payroll_payable_account = frappe.db.get_value("Company", + {"company_name": self.company}, "default_payroll_payable_account") + + if not payroll_payable_account: + frappe.throw(_("Please set Default Payroll Payable Account in Company {0}") + .format(self.company)) + + return payroll_payable_account - def make_journal_entry(self, reference_number = None, reference_date = None): + def make_accural_jv_entry(self): self.check_permission('write') earnings = self.get_salary_component_total(component_type = "earnings") or {} deductions = self.get_salary_component_total(component_type = "deductions") or {} + default_payroll_payable_account = self.get_default_payroll_payable_account() + loan_amounts = self.get_total_salary_and_loan_amounts() + loan_accounts = self.get_loan_accounts() jv_name = "" if earnings or deductions: journal_entry = frappe.new_doc('Journal Entry') - journal_entry.voucher_type = 'Bank Entry' - journal_entry.user_remark = _('Payment of salary from {0} to {1}').format(self.start_date, + journal_entry.voucher_type = 'Journal Entry' + journal_entry.user_remark = _('Accural Journal Entry for salaries from {0} to {1}').format(self.start_date, self.end_date) journal_entry.company = self.company journal_entry.posting_date = nowdate() @@ -255,22 +279,36 @@ class ProcessPayroll(Document): adjustment_amt = adjustment_amt+amt account_amt_list.append({ "account": acc, - "debit_in_account_currency": amt + "debit_in_account_currency": amt, + "cost_center": self.cost_center, + "project": self.project }) for acc, amt in deductions.items(): adjustment_amt = adjustment_amt-amt account_amt_list.append({ "account": acc, - "credit_in_account_currency": amt + "credit_in_account_currency": amt, + "cost_center": self.cost_center, + "project": self.project }) + #employee loan account_amt_list.append({ - "account": self.payment_account, + "account": loan_accounts.employee_loan_account, + "credit_in_account_currency": loan_amounts.total_principal_amount + }) + account_amt_list.append({ + "account": loan_accounts.interest_income_account, + "credit_in_account_currency": loan_amounts.total_interest_amount, + "cost_center": self.cost_center, + "project": self.project + }) + adjustment_amt = adjustment_amt-(loan_amounts.total_loan_repayment) + + account_amt_list.append({ + "account": default_payroll_payable_account, "credit_in_account_currency": adjustment_amt }) journal_entry.set("accounts", account_amt_list) - journal_entry.cheque_no = reference_number - journal_entry.cheque_date = reference_date - journal_entry.multi_currency = 1 journal_entry.save() try: journal_entry.submit() @@ -278,15 +316,33 @@ class ProcessPayroll(Document): self.update_salary_slip_status(jv_name = jv_name) except Exception, e: frappe.msgprint(e) - return self.create_jv_log(jv_name) + return jv_name + def make_payment_entry(self): + self.check_permission('write') + total_salary_amount = self.get_total_salary_and_loan_amounts() + default_payroll_payable_account = self.get_default_payroll_payable_account() - def create_jv_log(self, jv_name): - log = "

" + _("No submitted Salary Slip found") + "

" - if jv_name: - log = "" + _("Journal Entry Submitted") + "\ - %s" % '
''{0}'.format(jv_name) - return log + if total_salary_amount.rounded_total: + journal_entry = frappe.new_doc('Journal Entry') + journal_entry.voucher_type = 'Bank Entry' + journal_entry.user_remark = _('Payment of salary from {0} to {1}').format(self.start_date, + self.end_date) + journal_entry.company = self.company + journal_entry.posting_date = nowdate() + + account_amt_list = [] + + account_amt_list.append({ + "account": self.payment_account, + "credit_in_account_currency": total_salary_amount.rounded_total + }) + account_amt_list.append({ + "account": default_payroll_payable_account, + "debit_in_account_currency": total_salary_amount.rounded_total + }) + journal_entry.set("accounts", account_amt_list) + return journal_entry.as_dict() def update_salary_slip_status(self, jv_name = None): ss_list = self.get_sal_slip_list(ss_status=1) diff --git a/erpnext/hr/doctype/process_payroll/test_process_payroll.py b/erpnext/hr/doctype/process_payroll/test_process_payroll.py index 2eb1c6b76b3..6347a2a2353 100644 --- a/erpnext/hr/doctype/process_payroll/test_process_payroll.py +++ b/erpnext/hr/doctype/process_payroll/test_process_payroll.py @@ -29,7 +29,7 @@ class TestProcessPayroll(unittest.TestCase): process_payroll.create_salary_slips() process_payroll.submit_salary_slips() if process_payroll.get_sal_slip_list(ss_status = 1): - r = process_payroll.make_journal_entry(reference_number=random_string(10),reference_date=nowdate()) + r = process_payroll.make_payment_entry() def get_salary_component_account(sal_comp): diff --git a/erpnext/hr/doctype/salary_component/salary_component.js b/erpnext/hr/doctype/salary_component/salary_component.js index 3ed566e41dd..86203ab44e7 100644 --- a/erpnext/hr/doctype/salary_component/salary_component.js +++ b/erpnext/hr/doctype/salary_component/salary_component.js @@ -2,7 +2,17 @@ // For license information, please see license.txt frappe.ui.form.on('Salary Component', { - refresh: function(frm) { - + setup: function(frm) { + frm.set_query("default_account", "accounts", function(doc, cdt, cdn) { + var d = locals[cdt][cdn]; + var root_types = ["Expense", "Liability"]; + return { + filters: { + "root_type": ["in", root_types], + "is_group": 0, + "company": d.company + } + } + }) } -}); +}); \ No newline at end of file diff --git a/erpnext/hr/doctype/salary_component/salary_component.py b/erpnext/hr/doctype/salary_component/salary_component.py index 8af7311f8f4..c02d952ac1f 100644 --- a/erpnext/hr/doctype/salary_component/salary_component.py +++ b/erpnext/hr/doctype/salary_component/salary_component.py @@ -21,4 +21,4 @@ class SalaryComponent(Document): frappe.throw(_("Abbreviation cannot have more than 5 characters")) if frappe.db.sql("select salary_component_abbr from `tabSalary Component` where name!=%s and salary_component_abbr=%s", (self.name, self.salary_component_abbr)): - frappe.throw(_("Abbreviation already used for another salary component")) \ No newline at end of file + frappe.throw(_("Abbreviation {0} already used for another salary component").format(self.salary_component_abbr)) \ No newline at end of file diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js index 02622598551..bf86aba7d5a 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.js +++ b/erpnext/hr/doctype/salary_slip/salary_slip.js @@ -38,6 +38,7 @@ frappe.ui.form.on("Salary Slip", { refresh: function(frm) { frm.trigger("toggle_fields") + frm.trigger("toggle_reqd_fields") salary_detail_fields = ['formula', 'abbr'] cur_frm.fields_dict['earnings'].grid.set_column_disp(salary_detail_fields,false); cur_frm.fields_dict['deductions'].grid.set_column_disp(salary_detail_fields,false); @@ -58,8 +59,17 @@ frappe.ui.form.on("Salary Slip", { frm.toggle_display(['payment_days', 'total_working_days', 'leave_without_pay'], frm.doc.payroll_frequency!=""); } + }) +frappe.ui.form.on('Salary Detail', { + earnings_remove: function(frm, dt, dn) { + calculate_all(frm.doc, dt, dn); + }, + deductions_remove: function(frm, dt, dn) { + calculate_all(frm.doc, dt, dn); + } +}) // Get leave details //--------------------------------------------------------------------- @@ -130,7 +140,7 @@ var calculate_earning_total = function(doc, dt, dn, reset_amount) { total_earn += flt(tbl[i].amount); } - doc.gross_pay = total_earn + flt(doc.arrear_amount) + flt(doc.leave_encashment_amount); + doc.gross_pay = total_earn; refresh_many(['amount','gross_pay']); } @@ -161,17 +171,6 @@ var calculate_net_pay = function(doc, dt, dn) { refresh_many(['net_pay', 'rounded_total']); } -// trigger on arrear -// ------------------------------------------------------------------------ -cur_frm.cscript.arrear_amount = function(doc,dt,dn){ - calculate_earning_total(doc, dt, dn); - calculate_net_pay(doc, dt, dn); -} - -// trigger on encashed amount -// ------------------------------------------------------------------------ -cur_frm.cscript.leave_encashment_amount = cur_frm.cscript.arrear_amount; - // validate // ------------------------------------------------------------------------ cur_frm.cscript.validate = function(doc, dt, dn) { diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json index 7d5dbe9c9aa..03628e89bcc 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.json +++ b/erpnext/hr/doctype/salary_slip/salary_slip.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Posting Date", @@ -78,7 +80,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 1, "label": "Employee", @@ -108,7 +111,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Name", @@ -138,7 +142,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Department", @@ -169,7 +174,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Designation", @@ -199,7 +205,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Branch", @@ -230,6 +237,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -258,6 +266,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Status", @@ -282,16 +291,18 @@ "collapsible": 0, "columns": 0, "fieldname": "journal_entry", - "fieldtype": "Data", + "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Journal Entry", "length": 0, "no_copy": 0, + "options": "Journal Entry", "permlevel": 0, "precision": "", "print_hide": 0, @@ -314,7 +325,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Company", @@ -343,6 +355,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Letter Head", @@ -371,6 +384,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -399,6 +413,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Salary Slip Based on Timesheet", @@ -429,6 +444,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Start Date", @@ -459,6 +475,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "End Date", @@ -487,6 +504,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -515,6 +533,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Salary Structure", @@ -546,6 +565,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payroll Frequency", @@ -576,6 +596,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Working Days", @@ -606,6 +627,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Leave Without Pay", @@ -636,6 +658,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment Days", @@ -666,6 +689,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -695,6 +719,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Salary Slip Timesheet", @@ -724,6 +749,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -751,6 +777,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Working Hours", @@ -779,11 +806,13 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Hour Rate", "length": 0, "no_copy": 0, + "options": "Company:company:default_currency", "permlevel": 0, "precision": "2", "print_hide": 0, @@ -808,6 +837,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -836,6 +866,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Bank Name", @@ -865,6 +896,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Bank Account No.", @@ -894,6 +926,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -921,6 +954,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -951,6 +985,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Earning & Deduction", @@ -979,6 +1014,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Earning", @@ -1009,6 +1045,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Earnings", @@ -1039,6 +1076,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Deduction", @@ -1068,6 +1106,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Deductions", @@ -1098,6 +1137,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -1115,66 +1155,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "arrear_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Arrear Amount", - "length": 0, - "no_copy": 0, - "oldfieldname": "arrear_amount", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "leave_encashment_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Leave Encashment Amount", - "length": 0, - "no_copy": 0, - "oldfieldname": "encashment_amount", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_on_submit": 0, "bold": 0, @@ -1186,6 +1166,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Gross Pay", @@ -1216,6 +1197,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1242,6 +1224,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Deduction", @@ -1266,17 +1249,49 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "total_loan_repayment", "fieldname": "loan_repayment", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Loan repayment", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "principal_amount", "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Loan Repayment", + "label": "Principal Amount", "length": 0, "no_copy": 0, + "options": "Company:company:default_currency", "permlevel": 0, "precision": "", "print_hide": 0, @@ -1294,13 +1309,131 @@ "bold": 0, "collapsible": 0, "columns": 0, - "description": "Gross Pay + Arrear Amount + Encashment Amount - Total Deduction - Loan Repayment", + "fieldname": "interest_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Interest Amount", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_48", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "total_loan_repayment", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Loan Repayment", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "net_pay_info", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "net pay info", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Gross Pay - Total Deduction - Loan Repayment", "fieldname": "net_pay", "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Pay", @@ -1320,6 +1453,34 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_53", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 1, @@ -1331,6 +1492,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rounded Total", @@ -1348,6 +1510,34 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_55", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -1360,6 +1550,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total in words", @@ -1390,7 +1581,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-01-09 12:37:03.802501", + "modified": "2017-02-22 06:11:01.882797", "modified_by": "Administrator", "module": "HR", "name": "Salary Slip", @@ -1406,7 +1597,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1428,7 +1618,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1449,7 +1638,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -1465,6 +1653,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "employee", diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 5ff1248717d..6ff6f363a52 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -155,11 +155,10 @@ class SalarySlip(TransactionBase): cond = """and payroll_frequency = '%(payroll_frequency)s'""" % {"payroll_frequency": self.payroll_frequency} st_name = frappe.db.sql("""select parent from `tabSalary Structure Employee` - where employee=%s + where employee=%s and (from_date <= %s or from_date <= %s) + and (to_date is null or to_date >= %s or to_date >= %s) and parent in (select name from `tabSalary Structure` - where is_active = 'Yes' - and (from_date <= %s or from_date <= %s) - and (to_date is null or to_date >= %s or to_date >= %s) %s) + where is_active = 'Yes'%s) """% ('%s', '%s', '%s','%s','%s', cond),(self.employee, self.start_date, joining_date, self.end_date, relieving_date)) if st_name: @@ -283,6 +282,7 @@ class SalarySlip(TransactionBase): where t2.name = t1.leave_type and t2.is_lwp = 1 and t1.docstatus = 1 + and t1.status = 'Approved' and t1.employee = %(employee)s and CASE WHEN t2.include_holiday != 1 THEN %(dt)s not in ('{0}') and %(dt)s between from_date and to_date WHEN t2.include_holiday THEN %(dt)s between from_date and to_date @@ -323,25 +323,28 @@ class SalarySlip(TransactionBase): disable_rounded_total = cint(frappe.db.get_value("Global Defaults", None, "disable_rounded_total")) - self.gross_pay = flt(self.arrear_amount) + flt(self.leave_encashment_amount) self.total_deduction = 0 + self.gross_pay = 0 self.sum_components('earnings', 'gross_pay') self.sum_components('deductions', 'total_deduction') self.set_loan_repayment() - self.net_pay = flt(self.gross_pay) - (flt(self.total_deduction) + flt(self.loan_repayment)) + self.net_pay = flt(self.gross_pay) - (flt(self.total_deduction) + flt(self.total_loan_repayment)) self.rounded_total = rounded(self.net_pay, self.precision("net_pay") if disable_rounded_total else 0) def set_loan_repayment(self): - employee_loan = frappe.db.sql("""select sum(total_payment) as loan_repayment from `tabRepayment Schedule` + employee_loan = frappe.db.sql("""select sum(principal_amount) as principal_amount, sum(interest_amount) as interest_amount, + sum(total_payment) as total_loan_repayment from `tabRepayment Schedule` where payment_date between %s and %s and parent in (select name from `tabEmployee Loan` where employee = %s and repay_from_salary = 1 and docstatus = 1)""", - (self.start_date, self.end_date, self.employee), as_dict=True) + (self.start_date, self.end_date, self.employee), as_dict=True) if employee_loan: - self.loan_repayment = employee_loan[0].loan_repayment + self.principal_amount = employee_loan[0].principal_amount + self.interest_amount = employee_loan[0].interest_amount + self.total_loan_repayment = employee_loan[0].total_loan_repayment def on_submit(self): if self.net_pay < 0: diff --git a/erpnext/hr/doctype/salary_slip/test_salary_slip.py b/erpnext/hr/doctype/salary_slip/test_salary_slip.py index 9999f1ec088..ce20396b22c 100644 --- a/erpnext/hr/doctype/salary_slip/test_salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/test_salary_slip.py @@ -7,14 +7,14 @@ import frappe import erpnext import calendar from erpnext.accounts.utils import get_fiscal_year -from frappe.utils import getdate, nowdate, add_days, flt +from frappe.utils import getdate, nowdate, add_days, add_months, flt from erpnext.hr.doctype.salary_structure.salary_structure import make_salary_slip from erpnext.hr.doctype.process_payroll.test_process_payroll import get_salary_component_account from erpnext.hr.doctype.process_payroll.process_payroll import get_month_details class TestSalarySlip(unittest.TestCase): def setUp(self): - make_earning_salary_component(["Basic Salary", "Allowance", "HRA"]) + make_earning_salary_component(["Basic Salary", "Special Allowance", "HRA"]) make_deduction_salary_component(["Professional Tax", "TDS"]) for dt in ["Leave Application", "Leave Allocation", "Salary Slip"]: @@ -143,8 +143,8 @@ class TestSalarySlip(unittest.TestCase): ss = frappe.get_doc("Salary Slip", self.make_employee_salary_slip("test_employee@salary.com", "Monthly")) ss.submit() - self.assertEquals(ss.loan_repayment, 582) - self.assertEquals(ss.net_pay, (flt(ss.gross_pay) - (flt(ss.total_deduction) + flt(ss.loan_repayment)))) + self.assertEquals(ss.total_loan_repayment, 582) + self.assertEquals(ss.net_pay, (flt(ss.gross_pay) - (flt(ss.total_deduction) + flt(ss.total_loan_repayment)))) def test_payroll_frequency(self): fiscal_year = get_fiscal_year(nowdate(), company="_Test Company")[0] @@ -273,7 +273,6 @@ def make_salary_structure(sal_struct, payroll_frequency, employee): "doctype": "Salary Structure", "name": sal_struct, "company": erpnext.get_default_company(), - "from_date": nowdate(), "employees": get_employee_details(employee), "earnings": get_earnings_component(), "deductions": get_deductions_component(), @@ -286,7 +285,8 @@ def make_salary_structure(sal_struct, payroll_frequency, employee): sal_struct.append("employees", {"employee": employee, "employee_name": employee, "base": 32000, - "variable": 3200 + "variable": 3200, + "from_date": add_months(nowdate(),-1) }) sal_struct.save() sal_struct = sal_struct.name @@ -295,7 +295,8 @@ def make_salary_structure(sal_struct, payroll_frequency, employee): def get_employee_details(employee): return [{"employee": employee, "base": 50000, - "variable": 5000 + "variable": 5000, + "from_date": add_months(nowdate(),-1) } ] @@ -322,8 +323,8 @@ def get_earnings_component(): "idx": 3 }, { - "salary_component": 'Allowance', - "abbr":'A', + "salary_component": 'Special Allowance', + "abbr":'SA', "condition": 'H < 10000', "formula": 'BS*.5', "idx": 4 diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.json b/erpnext/hr/doctype/salary_structure/salary_structure.json index b34cff19a1d..4145fcbffb0 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure.json +++ b/erpnext/hr/doctype/salary_structure/salary_structure.json @@ -21,6 +21,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -47,6 +49,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -74,6 +78,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Letter Head", @@ -92,36 +98,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Monthly", - "depends_on": "eval:(!doc.salary_slip_based_on_timesheet)", - "fieldname": "payroll_frequency", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Payroll Frequency", - "length": 0, - "no_copy": 0, - "options": "\nMonthly\nFortnightly\nBimonthly\nWeekly\nDaily", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_on_submit": 0, "bold": 0, @@ -132,6 +108,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -159,6 +137,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Is Active", @@ -178,6 +158,38 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Monthly", + "depends_on": "eval:(!doc.salary_slip_based_on_timesheet)", + "fieldname": "payroll_frequency", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payroll Frequency", + "length": 0, + "no_copy": 0, + "options": "\nMonthly\nFortnightly\nBimonthly\nWeekly\nDaily", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -189,6 +201,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Default", @@ -207,62 +221,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "from_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "From Date", - "length": 0, - "no_copy": 0, - "oldfieldname": "from_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "to_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "To Date", - "length": 0, - "no_copy": 0, - "oldfieldname": "to_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_on_submit": 0, "bold": 0, @@ -273,6 +231,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -300,6 +260,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employees", @@ -328,6 +290,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -356,6 +320,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Salary Slip Based on Timesheet", @@ -383,6 +349,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -411,6 +379,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Salary Component", @@ -440,11 +410,14 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Hour Rate", "length": 0, "no_copy": 0, + "options": "Company:company:default_currency", "permlevel": 0, "precision": "2", "print_hide": 0, @@ -469,6 +442,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -498,6 +473,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Earning", @@ -528,6 +505,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Earnings", @@ -557,6 +536,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Deduction", @@ -586,6 +567,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Deductions", @@ -616,6 +599,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -642,6 +627,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -668,6 +655,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Earning", @@ -697,6 +686,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Deduction", @@ -726,6 +717,8 @@ "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Pay", @@ -753,6 +746,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Account", @@ -780,6 +775,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mode of Payment", @@ -808,6 +805,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -834,6 +833,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Payment Account", @@ -864,7 +865,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-02-02 01:23:49.179497", + "modified": "2017-02-22 06:09:55.491748", "modified_by": "Administrator", "module": "HR", "name": "Salary Structure", @@ -914,6 +915,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "", diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.py b/erpnext/hr/doctype/salary_structure/salary_structure.py index 0e2dd1bb4ad..22697f08a2a 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure.py +++ b/erpnext/hr/doctype/salary_structure/salary_structure.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals import frappe -from frappe.utils import flt, cint +from frappe.utils import flt, cint, getdate from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.model.document import Document @@ -16,6 +16,7 @@ class SalaryStructure(Document): self.validate_amount() for e in self.get('employees'): set_employee_name(e) + self.validate_joining_date() def get_ss_values(self,employee): basic_info = frappe.db.sql("""select bank_name, bank_ac_no @@ -27,14 +28,25 @@ class SalaryStructure(Document): def validate_amount(self): if flt(self.net_pay) < 0 and self.salary_slip_based_on_timesheet: frappe.throw(_("Net pay cannot be negative")) - + + def validate_joining_date(self): + for e in self.get('employees'): + joining_date = getdate(frappe.db.get_value("Employee", e.employee, "date_of_joining")) + if e.from_date and getdate(e.from_date) < joining_date: + frappe.throw(_("From Date {0} for Employee {1} cannot be before employee's joining Date {2}") + .format(e.from_date, e.employee, joining_date)) @frappe.whitelist() def make_salary_slip(source_name, target_doc = None, employee = None, as_print = False, print_format = None): def postprocess(source, target): if employee: + employee_details = frappe.db.get_value("Employee", employee, + ["employee_name", "branch", "designation", "department"], as_dict=1) target.employee = employee - target.employee_name = frappe.get_value("Employee",employee, "employee_name") + target.employee_name = employee_details.employee_name + target.branch = employee_details.branch + target.designation = employee_details.designation + target.department = employee_details.department target.run_method('process_salary_structure') doc = get_mapped_doc("Salary Structure", source_name, { diff --git a/erpnext/hr/doctype/salary_structure/test_salary_structure.py b/erpnext/hr/doctype/salary_structure/test_salary_structure.py index 36e50d319af..7270ab78540 100644 --- a/erpnext/hr/doctype/salary_structure/test_salary_structure.py +++ b/erpnext/hr/doctype/salary_structure/test_salary_structure.py @@ -6,7 +6,7 @@ import frappe import unittest import erpnext from frappe.utils.make_random import get_random -from frappe.utils import nowdate, add_days, add_years, getdate +from frappe.utils import nowdate, add_days, add_years, getdate, add_months from erpnext.hr.doctype.salary_structure.salary_structure import make_salary_slip from erpnext.hr.doctype.salary_slip.test_salary_slip \ import make_earning_salary_component, make_deduction_salary_component @@ -17,7 +17,7 @@ class TestSalaryStructure(unittest.TestCase): def setUp(self): self.make_holiday_list() frappe.db.set_value("Company", erpnext.get_default_company(), "default_holiday_list", "Salary Structure Test Holiday List") - make_earning_salary_component(["Basic Salary", "Allowance", "HRA"]) + make_earning_salary_component(["Basic Salary", "Special Allowance", "HRA"]) make_deduction_salary_component(["Professional Tax", "TDS"]) make_employee("test_employee@salary.com") make_employee("test_employee_2@salary.com") @@ -93,7 +93,6 @@ def make_salary_structure(sal_struct): "doctype": "Salary Structure", "name": sal_struct, "company": erpnext.get_default_company(), - "from_date": nowdate(), "employees": get_employee_details(), "earnings": get_earnings_component(), "deductions": get_deductions_component(), @@ -107,11 +106,13 @@ def get_employee_details(): return [{"employee": frappe.get_value("Employee", {"employee_name":"test_employee@salary.com"}, "name"), "base": 25000, "variable": 5000, + "from_date": add_months(nowdate(),-1), "idx": 1 }, {"employee": frappe.get_value("Employee", {"employee_name":"test_employee_2@salary.com"}, "name"), "base": 15000, "variable": 100, + "from_date": add_months(nowdate(),-1), "idx": 2 } ] @@ -139,8 +140,8 @@ def get_earnings_component(): "idx": 3 }, { - "salary_component": 'Allowance', - "abbr":'A', + "salary_component": 'Special Allowance', + "abbr":'SA', "condition": 'H < 10000', "formula": 'BS*.5', "idx": 4 diff --git a/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json b/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json index f5ac764171c..0e238d32332 100644 --- a/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json +++ b/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json @@ -10,6 +10,7 @@ "doctype": "DocType", "document_type": "", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, @@ -21,6 +22,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 0, "label": "Employee", @@ -49,6 +52,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Name", @@ -67,6 +72,62 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "from_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "From Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "to_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "To Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -77,11 +138,14 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Base", "length": 0, "no_copy": 0, + "options": "Company:company:default_currency", "permlevel": 0, "precision": "", "print_hide": 0, @@ -104,11 +168,14 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Variable", "length": 0, "no_copy": 0, + "options": "Company:company:default_currency", "permlevel": 0, "precision": "", "print_hide": 0, @@ -132,7 +199,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2017-02-02 02:06:33.809285", + "modified": "2017-02-23 17:08:44.518424", "modified_by": "Administrator", "module": "HR", "name": "Salary Structure Employee", @@ -142,8 +209,9 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "track_changes": 0, "track_seen": 0 -} \ No newline at end of file +} diff --git a/erpnext/hr/doctype/training_event/training_event.json b/erpnext/hr/doctype/training_event/training_event.json index 610ec055378..1f79d231adf 100644 --- a/erpnext/hr/doctype/training_event/training_event.json +++ b/erpnext/hr/doctype/training_event/training_event.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Event Name", @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Event Status", @@ -79,6 +81,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -106,6 +109,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Type", @@ -135,6 +139,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -162,6 +167,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Trainer Name", @@ -190,6 +196,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Trainer Email", @@ -219,6 +226,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -246,6 +254,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier", @@ -275,6 +284,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Number", @@ -303,6 +313,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -330,6 +341,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Course", @@ -359,6 +371,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Location", @@ -387,6 +400,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -414,6 +428,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Start Time", @@ -442,6 +457,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "End Time", @@ -470,6 +486,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -497,6 +514,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Introduction", @@ -525,6 +543,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Attendees", @@ -554,6 +573,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Send Email", @@ -582,6 +602,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employees", @@ -611,6 +632,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -639,7 +661,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-12-15 14:49:36.135608", + "modified": "2017-02-17 16:51:35.141403", "modified_by": "Administrator", "module": "HR", "name": "Training Event", @@ -656,7 +678,6 @@ "export": 1, "if_owner": 0, "import": 1, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -672,8 +693,10 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "event_name", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "title_field": "event_name", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/training_feedback/training_feedback.json b/erpnext/hr/doctype/training_feedback/training_feedback.json index e45c6945985..ece6ed1d904 100644 --- a/erpnext/hr/doctype/training_feedback/training_feedback.json +++ b/erpnext/hr/doctype/training_feedback/training_feedback.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 1, "label": "Employee", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Name", @@ -80,6 +82,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Course", @@ -109,6 +112,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -136,6 +140,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Training Event", @@ -165,6 +170,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Event Name", @@ -193,6 +199,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Trainer Name", @@ -221,6 +228,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -248,6 +256,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Feedback", @@ -276,6 +285,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -304,7 +314,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-12-15 14:49:55.261774", + "modified": "2017-02-17 17:09:26.052837", "modified_by": "Administrator", "module": "HR", "name": "Training Feedback", @@ -321,7 +331,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -342,7 +351,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -357,8 +365,10 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "title_field": "employee_name", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/hr/doctype/vehicle_log/vehicle_log.json b/erpnext/hr/doctype/vehicle_log/vehicle_log.json index a2cfa276151..3610da4baf0 100644 --- a/erpnext/hr/doctype/vehicle_log/vehicle_log.json +++ b/erpnext/hr/doctype/vehicle_log/vehicle_log.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -78,7 +80,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 0, "label": "License Plate", @@ -108,6 +111,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Employee", @@ -137,6 +141,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -164,6 +169,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -191,6 +197,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Model", @@ -219,6 +226,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Make", @@ -247,6 +255,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Odometer Reading", @@ -275,6 +284,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Date", @@ -303,6 +313,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Odometer", @@ -331,6 +342,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Refuelling Details", @@ -359,6 +371,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Fuel Qty", @@ -387,6 +400,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Fuel Price", @@ -415,6 +429,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -442,6 +457,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Supplier", @@ -471,6 +487,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Invoice Ref", @@ -499,6 +516,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Service_Details", @@ -527,6 +545,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Service Detail", @@ -556,6 +575,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -584,6 +604,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Make Expense Claim", @@ -612,6 +633,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -640,7 +662,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-01-09 11:10:21.208266", + "modified": "2017-02-17 16:53:17.975663", "modified_by": "Administrator", "module": "HR", "name": "Vehicle Log", @@ -657,7 +679,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -672,6 +693,7 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "title_field": "", diff --git a/erpnext/hr/print_format/salary_slip_standard/salary_slip_standard.json b/erpnext/hr/print_format/salary_slip_standard/salary_slip_standard.json index 0c38d4541aa..cb4003a28ef 100644 --- a/erpnext/hr/print_format/salary_slip_standard/salary_slip_standard.json +++ b/erpnext/hr/print_format/salary_slip_standard/salary_slip_standard.json @@ -6,7 +6,7 @@ "docstatus": 0, "doctype": "Print Format", "font": "Default", - "format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"HTML\", \"options\": \"

{{doc.name}}

\\n
\\n
\\n
\"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"employee\"}, {\"print_hide\": 0, \"fieldname\": \"company\"}, {\"print_hide\": 0, \"fieldname\": \"employee_name\"}, {\"print_hide\": 0, \"fieldname\": \"department\"}, {\"print_hide\": 0, \"fieldname\": \"designation\"}, {\"print_hide\": 0, \"fieldname\": \"branch\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"start_date\"}, {\"print_hide\": 0, \"fieldname\": \"end_date\"}, {\"print_hide\": 0, \"fieldname\": \"total_working_days\"}, {\"print_hide\": 0, \"fieldname\": \"leave_without_pay\"}, {\"print_hide\": 0, \"fieldname\": \"payment_days\"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"salary_component\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"depends_on_lwp\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"earnings\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"salary_component\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"depends_on_lwp\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"deductions\"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"arrear_amount\"}, {\"print_hide\": 0, \"fieldname\": \"leave_encashment_amount\"}, {\"print_hide\": 0, \"fieldname\": \"gross_pay\"}, {\"print_hide\": 0, \"fieldname\": \"total_deduction\"}, {\"print_hide\": 0, \"fieldname\": \"net_pay\"}, {\"print_hide\": 0, \"fieldname\": \"rounded_total\"}, {\"print_hide\": 0, \"fieldname\": \"total_in_words\"}]", + "format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"HTML\", \"options\": \"

{{doc.name}}

\\n
\\n
\\n
\"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"employee\"}, {\"print_hide\": 0, \"fieldname\": \"company\"}, {\"print_hide\": 0, \"fieldname\": \"employee_name\"}, {\"print_hide\": 0, \"fieldname\": \"department\"}, {\"print_hide\": 0, \"fieldname\": \"designation\"}, {\"print_hide\": 0, \"fieldname\": \"branch\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"start_date\"}, {\"print_hide\": 0, \"fieldname\": \"end_date\"}, {\"print_hide\": 0, \"fieldname\": \"total_working_days\"}, {\"print_hide\": 0, \"fieldname\": \"leave_without_pay\"}, {\"print_hide\": 0, \"fieldname\": \"payment_days\"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"salary_component\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"depends_on_lwp\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"earnings\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"salary_component\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"depends_on_lwp\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"deductions\"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"gross_pay\"}, {\"print_hide\": 0, \"fieldname\": \"total_deduction\"}, {\"print_hide\": 0, \"fieldname\": \"net_pay\"}, {\"print_hide\": 0, \"fieldname\": \"rounded_total\"}, {\"print_hide\": 0, \"fieldname\": \"total_in_words\"}]", "idx": 0, "modified": "2016-08-22 00:21:42.600548", "modified_by": "Administrator", diff --git a/erpnext/hr/report/salary_register/salary_register.py b/erpnext/hr/report/salary_register/salary_register.py index 1e36b92e22a..88f6f470b1e 100644 --- a/erpnext/hr/report/salary_register/salary_register.py +++ b/erpnext/hr/report/salary_register/salary_register.py @@ -22,7 +22,7 @@ def execute(filters=None): for e in earning_types: row.append(ss_earning_map.get(ss.name, {}).get(e)) - row += [ss.arrear_amount, ss.leave_encashment_amount, ss.gross_pay] + row += [ss.gross_pay] for d in ded_types: row.append(ss_ded_map.get(ss.name, {}).get(d)) @@ -50,8 +50,7 @@ def get_columns(salary_slips): salary_components[_(component.type)].append(component.salary_component) columns = columns + [(e + ":Currency:120") for e in salary_components[_("Earning")]] + \ - [ _("Arrear Amount") + ":Currency:120", _("Leave Encashment Amount") + ":Currency:150", - _("Gross Pay") + ":Currency:120"] + [(d + ":Currency:120") for d in salary_components[_("Deduction")]] + \ + [_("Gross Pay") + ":Currency:120"] + [(d + ":Currency:120") for d in salary_components[_("Deduction")]] + \ [_("Total Deduction") + ":Currency:120", _("Net Pay") + ":Currency:120"] return columns, salary_components[_("Earning")], salary_components[_("Deduction")] diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.json b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.json index 60ddf63526c..a1bcf15476f 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.json +++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -79,7 +81,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Customer", @@ -110,6 +113,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -137,7 +141,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Status", @@ -167,7 +172,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Transaction Date", @@ -197,6 +203,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -226,6 +233,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Items", @@ -256,6 +264,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Schedule", @@ -285,6 +294,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Generate Schedule", @@ -313,6 +323,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Schedules", @@ -343,6 +354,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Info", @@ -370,7 +382,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 0, "label": "Customer Name", @@ -401,6 +414,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Person", @@ -430,6 +444,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mobile No", @@ -458,6 +473,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Email", @@ -485,6 +501,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact", @@ -512,6 +529,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -539,6 +557,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Address", @@ -567,6 +586,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address", @@ -595,7 +615,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Territory", @@ -628,6 +649,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Group", @@ -655,7 +677,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -686,6 +709,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -715,7 +739,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:54:23.335854", + "modified": "2017-02-17 17:07:02.336621", "modified_by": "Administrator", "module": "Maintenance", "name": "Maintenance Schedule", @@ -731,7 +755,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -747,7 +770,9 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "status,customer,customer_name", + "show_name_in_global_search": 0, "sort_order": "DESC", "timeline_field": "customer", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json b/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json index 93c706a772f..0a7443671d7 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json +++ b/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json @@ -10,18 +10,22 @@ "doctype": "DocType", "document_type": "Document", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "item_code", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Code", "length": 0, "no_copy": 0, @@ -32,6 +36,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -42,13 +47,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "item_name", "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Name", "length": 0, "no_copy": 0, @@ -58,6 +66,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -68,13 +77,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "scheduled_date", "fieldtype": "Date", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Scheduled Date", "length": 0, "no_copy": 0, @@ -84,6 +96,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 1, @@ -94,13 +107,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "actual_date", "fieldtype": "Date", "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Actual Date", "length": 0, "no_copy": 1, @@ -110,6 +126,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 1, "reqd": 0, "search_index": 0, @@ -120,13 +137,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "sales_person", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Sales Person", "length": 0, "no_copy": 0, @@ -137,6 +157,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -147,13 +168,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "serial_no", "fieldtype": "Small Text", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Serial No", "length": 0, "no_copy": 0, @@ -164,6 +188,7 @@ "print_hide_if_no_value": 0, "print_width": "160px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -182,7 +207,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-07-11 03:28:02.171375", + "modified": "2017-02-17 17:05:44.644663", "modified_by": "Administrator", "module": "Maintenance", "name": "Maintenance Schedule Detail", @@ -191,5 +216,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json b/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json index 1e68fab4d64..c6aac146352 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json +++ b/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json @@ -22,8 +22,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Code", "length": 0, "no_copy": 0, @@ -52,7 +54,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Name", "length": 0, "no_copy": 0, @@ -80,7 +84,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -110,7 +116,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "", "length": 0, "no_copy": 0, @@ -135,8 +143,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Start Date", "length": 0, "no_copy": 0, @@ -163,8 +173,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "End Date", "length": 0, "no_copy": 0, @@ -192,7 +204,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Periodicity", "length": 0, "no_copy": 0, @@ -221,7 +235,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "No of Visits", "length": 0, "no_copy": 0, @@ -248,8 +264,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Sales Person", "length": 0, "no_copy": 0, @@ -278,7 +296,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Reference", "length": 0, "no_copy": 0, @@ -304,7 +324,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Serial No", "length": 0, "no_copy": 0, @@ -331,8 +353,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Sales Order", "length": 0, "no_copy": 1, @@ -363,7 +387,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2017-01-11 12:02:38.449129", + "modified": "2017-02-17 17:06:21.448695", "modified_by": "Administrator", "module": "Maintenance", "name": "Maintenance Schedule Item", @@ -372,5 +396,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.json b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.json index 6efd6fd1d1f..c8406007066 100644 --- a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.json +++ b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -78,6 +80,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -106,7 +109,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer", @@ -137,6 +141,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Name", @@ -164,6 +169,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Address", @@ -191,6 +197,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact", @@ -218,6 +225,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Mobile No", @@ -245,6 +253,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Email", @@ -272,6 +281,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -301,6 +311,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Maintenance Date", @@ -330,6 +341,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Maintenance Time", @@ -359,6 +371,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -388,6 +401,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Completion Status", @@ -418,6 +432,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -444,7 +459,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Maintenance Type", @@ -475,6 +491,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -503,6 +520,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Purposes", @@ -533,6 +551,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "More Information", @@ -562,6 +581,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Feedback", @@ -591,6 +611,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -618,6 +639,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Status", @@ -648,6 +670,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -678,7 +701,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -710,6 +734,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Info", @@ -738,6 +763,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Address", @@ -766,6 +792,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Contact Person", @@ -794,6 +821,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -821,6 +849,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Territory", @@ -850,6 +879,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Customer Group", @@ -879,7 +909,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:13:23.358364", + "modified": "2017-02-17 17:08:30.893833", "modified_by": "Administrator", "module": "Maintenance", "name": "Maintenance Visit", @@ -895,7 +925,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -911,9 +940,11 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "status,maintenance_type,customer,customer_name,mntc_date,company", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "timeline_field": "customer", "title_field": "customer_name", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json b/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json index c59c46992a9..e55f562dd05 100644 --- a/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json +++ b/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json @@ -10,18 +10,22 @@ "doctype": "DocType", "document_type": "Document", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "item_code", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Code", "length": 0, "no_copy": 0, @@ -32,6 +36,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -42,13 +47,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "item_name", "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Name", "length": 0, "no_copy": 0, @@ -58,6 +66,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -68,13 +77,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "serial_no", "fieldtype": "Small Text", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Serial No", "length": 0, "no_copy": 0, @@ -84,6 +96,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -94,13 +107,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "description", "fieldtype": "Text Editor", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -111,6 +127,7 @@ "print_hide_if_no_value": 0, "print_width": "300px", "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -122,13 +139,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "work_details", "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "", "length": 0, "no_copy": 0, @@ -136,6 +156,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -146,13 +167,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "service_person", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Sales Person", "length": 0, "no_copy": 0, @@ -163,6 +187,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -173,13 +198,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "work_done", "fieldtype": "Small Text", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Work Done", "length": 0, "no_copy": 0, @@ -189,6 +217,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -199,13 +228,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "prevdoc_doctype", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Document Type", "length": 0, "no_copy": 1, @@ -217,6 +249,7 @@ "print_hide_if_no_value": 0, "print_width": "150px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 1, "reqd": 0, "search_index": 0, @@ -228,13 +261,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "prevdoc_docname", "fieldtype": "Dynamic Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Against Document No", "length": 0, "no_copy": 1, @@ -246,6 +282,7 @@ "print_hide_if_no_value": 0, "print_width": "160px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 1, "reqd": 0, "search_index": 0, @@ -257,13 +294,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "prevdoc_detail_docname", "fieldtype": "Data", "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Against Document Detail No", "length": 0, "no_copy": 1, @@ -274,6 +314,7 @@ "print_hide_if_no_value": 0, "print_width": "160px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 1, "reqd": 0, "search_index": 0, @@ -292,7 +333,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-07-11 03:28:02.369271", + "modified": "2017-02-17 17:06:11.910266", "modified_by": "Administrator", "module": "Maintenance", "name": "Maintenance Visit Purpose", @@ -301,5 +342,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/bom/bom.json b/erpnext/manufacturing/doctype/bom/bom.json index 51018d36068..9fa2a817014 100644 --- a/erpnext/manufacturing/doctype/bom/bom.json +++ b/erpnext/manufacturing/doctype/bom/bom.json @@ -21,6 +21,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Item", @@ -50,6 +52,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Item Name", @@ -79,6 +83,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Quantity", @@ -107,6 +113,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -133,6 +141,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Is Active", @@ -162,6 +172,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Is Default", @@ -189,8 +201,10 @@ "fieldname": "with_operations", "fieldtype": "Check", "hidden": 0, - "ignore_user_permissions": 0, + "ignore_user_permissions": 1, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "With Operations", @@ -217,6 +231,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rate Of Materials Based On", @@ -245,6 +261,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Price List", @@ -272,6 +290,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -299,6 +319,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Currency", @@ -312,7 +334,7 @@ "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, - "reqd": 0, + "reqd": 1, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -327,6 +349,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -353,6 +377,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Conversion Rate", @@ -365,7 +391,7 @@ "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, - "reqd": 0, + "reqd": 1, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -382,6 +408,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Operations", @@ -409,6 +437,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Operations", @@ -438,6 +468,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Materials", @@ -465,6 +497,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Items", @@ -494,6 +528,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Scrap", @@ -521,6 +557,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Scrap Items", @@ -549,6 +587,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Costing", @@ -576,6 +616,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Operating Cost", @@ -603,6 +645,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Raw Material Cost", @@ -630,6 +674,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Scrap Material Cost", @@ -658,6 +704,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -683,6 +731,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Operating Cost (Company Currency)", @@ -711,6 +761,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Raw Material Cost(Company Currency)", @@ -739,6 +791,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Scrap Material Cost(Company Currency)", @@ -767,6 +821,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -793,6 +849,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Total Cost", @@ -820,6 +878,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -846,6 +906,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Cost(Company Currency)", @@ -874,6 +936,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -900,6 +964,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Project", @@ -929,6 +995,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -942,7 +1010,7 @@ "read_only": 0, "remember_last_selected_value": 1, "report_hide": 0, - "reqd": 0, + "reqd": 1, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -957,6 +1025,8 @@ "hidden": 0, "ignore_user_permissions": 1, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -984,6 +1054,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1009,6 +1081,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Item UOM", @@ -1036,6 +1110,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1062,6 +1138,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Item Description", @@ -1088,6 +1166,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1114,6 +1194,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Image", @@ -1141,6 +1223,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Image View", @@ -1170,6 +1254,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Materials Required (Exploded)", @@ -1196,6 +1282,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Exploded_items", @@ -1214,6 +1302,276 @@ "search_index": 0, "set_only_once": 0, "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "website_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website", + "length": 0, + "no_copy": 0, + "options": "", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "show_in_website", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show in Website", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "route", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Route", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "show_in_website", + "description": "Item Image (if not slideshow)", + "fieldname": "website_image", + "fieldtype": "Attach Image", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Image", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "thumbnail", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Thumbnail", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "website_items", + "columns": 0, + "depends_on": "show_in_website", + "fieldname": "sb_web_spec", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website Specifications", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "show_in_website", + "fieldname": "web_long_description", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website Description", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "show_in_website", + "fieldname": "show_items", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show Items", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:(doc.show_in_website && doc.with_operations)", + "fieldname": "show_operations", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show Operations", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], "hide_heading": 0, @@ -1227,7 +1585,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-02-01 14:27:17.949390", + "modified": "2017-02-21 13:10:27.394012", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM", @@ -1298,6 +1656,7 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "item", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "track_changes": 0, diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 8102057a663..abb2817e4f0 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -6,7 +6,7 @@ import frappe from frappe.utils import cint, cstr, flt from frappe import _ from erpnext.setup.utils import get_exchange_rate -from frappe.model.document import Document +from frappe.website.website_generator import WebsiteGenerator from operator import itemgetter @@ -14,7 +14,13 @@ form_grid_templates = { "items": "templates/form_grid/item_grid.html" } -class BOM(Document): +class BOM(WebsiteGenerator): + website = frappe._dict( + # page_title_field = "item_name", + condition_field = "show_in_website", + template = "templates/generators/bom.html" + ) + def autoname(self): names = frappe.db.sql_list("""select name from `tabBOM` where item=%s""", self.item) @@ -34,6 +40,8 @@ class BOM(Document): self.name = 'BOM-' + self.item + ('-%.3i' % idx) def validate(self): + # if not self.route: + self.route = frappe.scrub(self.name).replace('_', '-') self.clear_operations() self.validate_main_item() self.validate_currency() @@ -47,6 +55,9 @@ class BOM(Document): self.validate_operations() self.calculate_cost() + def get_context(self, context): + context.parents = [{'name': 'boms', 'title': _('All BOMs') }] + def on_update(self): self.check_recursion() self.update_exploded_items() @@ -321,9 +332,9 @@ class BOM(Document): if d.bom_no: d.rate = self.get_bom_unitcost(d.bom_no) - d.base_rate = d.rate * self.conversion_rate + d.base_rate = flt(d.rate) * flt(self.conversion_rate) d.amount = flt(d.rate, self.precision("rate", d)) * flt(d.qty, self.precision("qty", d)) - d.base_amount = d.amount * self.conversion_rate + d.base_amount = d.amount * flt(self.conversion_rate) d.qty_consumed_per_unit = flt(d.qty, self.precision("qty", d)) / flt(self.quantity, self.precision("quantity")) total_rm_cost += d.amount base_total_rm_cost += d.base_amount @@ -428,6 +439,10 @@ class BOM(Document): if not d.description: d.description = frappe.db.get_value('Operation', d.operation, 'description') +def get_list_context(context): + context.title = _("Bill of Materials") + # context.introduction = _('Boms') + def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_items=0): item_dict = {} diff --git a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json index eca19b48e3e..f0758408060 100644 --- a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json +++ b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json @@ -10,18 +10,22 @@ "docstatus": 0, "doctype": "DocType", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "item_code", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Code", "length": 0, "no_copy": 0, @@ -32,6 +36,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -42,13 +47,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "cb", "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -56,6 +64,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -66,13 +75,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "item_name", "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, + "in_standard_filter": 0, "label": "Item Name", "length": 0, "no_copy": 0, @@ -81,6 +93,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -91,13 +104,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "section_break_3", "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -105,6 +121,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -115,13 +132,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "description", "fieldtype": "Text Editor", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -132,6 +152,7 @@ "print_hide_if_no_value": 0, "print_width": "300px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -143,13 +164,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "column_break_2", "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -157,6 +181,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -167,13 +192,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "image", "fieldtype": "Attach", "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Image", "length": 0, "no_copy": 0, @@ -182,6 +210,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -192,13 +221,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "image_view", "fieldtype": "Image", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Image View", "length": 0, "no_copy": 0, @@ -208,6 +240,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -218,13 +251,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "section_break_4", "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -232,6 +268,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -242,13 +279,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "qty", "fieldtype": "Float", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Qty", "length": 0, "no_copy": 0, @@ -258,6 +298,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -268,13 +309,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "rate", "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Rate", "length": 0, "no_copy": 0, @@ -285,6 +329,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -295,13 +340,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "qty_consumed_per_unit", "fieldtype": "Float", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Qty Consumed Per Unit", "length": 0, "no_copy": 0, @@ -309,6 +357,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -319,13 +368,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "column_break_8", "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -333,6 +385,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -343,13 +396,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "stock_uom", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Stock UOM", "length": 0, "no_copy": 0, @@ -360,6 +416,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -370,13 +427,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "amount", "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Amount", "length": 0, "no_copy": 0, @@ -387,6 +447,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -404,7 +465,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-07-11 03:27:58.370415", + "modified": "2017-02-17 17:27:43.757983", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Explosion Item", @@ -413,5 +474,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json index 50f1c6cd83d..b846bc6d5bc 100644 --- a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json +++ b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json @@ -21,8 +21,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Operation", "length": 0, "no_copy": 0, @@ -33,6 +33,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -49,8 +50,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Workstation", "length": 0, "no_copy": 0, @@ -61,6 +62,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -77,8 +79,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Description", "length": 0, "no_copy": 0, @@ -88,6 +90,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -104,14 +107,15 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -128,8 +132,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Hour Rate", "length": 0, "no_copy": 0, @@ -140,6 +144,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -157,8 +162,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Operation Time ", "length": 0, "no_copy": 0, @@ -169,6 +174,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -185,8 +191,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Operating Cost", "length": 0, "no_copy": 0, @@ -197,6 +203,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -213,8 +220,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Base Hour Rate(Company Currency)", "length": 0, "no_copy": 0, @@ -224,6 +231,7 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -241,8 +249,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Operating Cost(Company Currency)", "length": 0, "no_copy": 0, @@ -252,6 +260,34 @@ "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "image", + "fieldtype": "Attach", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Image", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -269,7 +305,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-10-21 18:38:14.700637", + "modified": "2017-02-10 07:12:41.255544", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Operation", @@ -278,5 +314,6 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/bom_website_item/__init__.py b/erpnext/manufacturing/doctype/bom_website_item/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.json b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.json new file mode 100644 index 00000000000..7df728b1cd2 --- /dev/null +++ b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.json @@ -0,0 +1,176 @@ +{ + "allow_copy": 0, + "allow_import": 0, + "allow_rename": 0, + "beta": 0, + "creation": "2017-02-10 05:36:19.757356", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "item_code", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Item Code", + "length": 0, + "no_copy": 0, + "options": "Item", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 3, + "fieldname": "item_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Item Name", + "length": 0, + "no_copy": 0, + "options": "Workstation", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "description", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Item Description", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 2, + "fieldname": "qty", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Qty", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "website_image", + "fieldtype": "Attach", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Image", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + } + ], + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "max_attachments": 0, + "modified": "2017-02-12 12:48:56.949861", + "modified_by": "Administrator", + "module": "Manufacturing", + "name": "BOM Website Item", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_seen": 0 +} \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py new file mode 100644 index 00000000000..4088a7fc540 --- /dev/null +++ b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class BOMWebsiteItem(Document): + pass diff --git a/erpnext/manufacturing/doctype/bom_website_operation/__init__.py b/erpnext/manufacturing/doctype/bom_website_operation/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.json b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.json new file mode 100644 index 00000000000..8f28dd7c453 --- /dev/null +++ b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.json @@ -0,0 +1,176 @@ +{ + "allow_copy": 0, + "allow_import": 0, + "allow_rename": 0, + "beta": 0, + "creation": "2017-02-10 05:27:16.031403", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "operation", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Operation", + "length": 0, + "no_copy": 0, + "options": "Operation", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "workstation", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Workstation", + "length": 0, + "no_copy": 0, + "options": "Workstation", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "time_in_mins", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Operation Time", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "website_image", + "fieldtype": "Attach", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Image", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "thumbnail", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Thumbnail", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + } + ], + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "max_attachments": 0, + "modified": "2017-02-12 16:32:44.316447", + "modified_by": "Administrator", + "module": "Manufacturing", + "name": "BOM Website Operation", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_seen": 0 +} \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py new file mode 100644 index 00000000000..bcc5ddab089 --- /dev/null +++ b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class BOMWebsiteOperation(Document): + pass diff --git a/erpnext/manufacturing/doctype/production_order/production_order.json b/erpnext/manufacturing/doctype/production_order/production_order.json index 04a3a93ddea..f9b99abedc3 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.json +++ b/erpnext/manufacturing/doctype/production_order/production_order.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -80,7 +82,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Status", @@ -110,7 +113,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 1, "label": "Item To Manufacture", @@ -143,6 +147,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "BOM No", @@ -175,6 +180,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Use Multi-Level BOM", @@ -202,6 +208,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -231,6 +238,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Order", @@ -260,6 +268,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Qty To Manufacture", @@ -292,6 +301,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Material Transferred for Manufacturing", @@ -323,6 +333,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Manufactured Qty", @@ -352,6 +363,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Warehouses", @@ -381,6 +393,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Source Warehouse (for reserving Items)", @@ -410,6 +423,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Work-in-Progress Warehouse", @@ -438,6 +452,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -466,6 +481,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Target Warehouse", @@ -494,6 +510,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Scrap Warehouse", @@ -523,6 +540,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Time", @@ -553,6 +571,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Expected Delivery Date", @@ -581,6 +600,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Planned Start Date", @@ -609,6 +629,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Planned End Date", @@ -637,6 +658,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -664,6 +686,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Actual Start Date", @@ -692,6 +715,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Actual End Date", @@ -721,6 +745,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Operations", @@ -751,6 +776,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Operations", @@ -781,6 +807,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Operation Cost", @@ -810,6 +837,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Planned Operating Cost", @@ -839,6 +867,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Actual Operating Cost", @@ -868,6 +897,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Additional Operating Cost", @@ -897,6 +927,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -924,6 +955,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Operating Cost", @@ -953,6 +985,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "More Information", @@ -981,6 +1014,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Item Description", @@ -1009,6 +1043,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Stock UOM", @@ -1039,6 +1074,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -1069,6 +1105,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -1095,7 +1132,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Project", @@ -1127,6 +1165,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Material Request", @@ -1156,6 +1195,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Material Request Item", @@ -1184,6 +1224,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -1214,6 +1255,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Required Items", @@ -1244,7 +1286,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-01-12 05:32:52.523006", + "modified": "2017-02-17 17:26:47.310275", "modified_by": "Administrator", "module": "Manufacturing", "name": "Production Order", @@ -1260,7 +1302,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1281,7 +1322,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -1296,6 +1336,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_order": "ASC", "title_field": "production_item", "track_changes": 0, diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py index f69087811b9..b39530097e7 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.py +++ b/erpnext/manufacturing/doctype/production_order/production_order.py @@ -258,13 +258,11 @@ class ProductionOrder(Document): timesheet = make_timesheet(self.name) workstation_list = [] - last_workstation_idx = {} timesheet.set('time_logs', []) for i, d in enumerate(self.operations): if d.workstation and d.status != 'Completed': - last_workstation_idx[d.workstation] = i # set last row index of workstation - self.set_start_end_time_for_workstation(d, workstation_list, last_workstation_idx.get(d.workstation)) + self.set_start_end_time_for_workstation(d, workstation_list, i) args = self.get_operations_data(d) add_timesheet_detail(timesheet, args) @@ -318,9 +316,8 @@ class ProductionOrder(Document): """Set start and end time for given operation. If first operation, set start as `planned_start_date`, else add time diff to end time of earlier operation.""" - if data.workstation not in workstation_list: + if index == 0: data.planned_start_time = self.planned_start_date - workstation_list.append(data.workstation) else: data.planned_start_time = get_datetime(self.operations[index-1].planned_end_time)\ + get_mins_between_operations() diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py index db5b66c579c..4692118cad3 100644 --- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py +++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py @@ -249,7 +249,7 @@ class ProductionPlanningTool(Document): "wip_warehouse" : "", "fg_warehouse" : d.warehouse, "status" : "Draft", - "project" : frappe.db.get_value("Sales Order", d.sales_order, "project") + "project" : frappe.db.get_value("Sales Order", d.sales_order, "project") } """ Club similar BOM and item for processing in case of Sales Orders """ @@ -345,53 +345,53 @@ class ProductionPlanningTool(Document): def get_subitems(self,bom_wise_item_details, bom, parent_qty, include_sublevel, only_raw, supply_subs,non_stock_item=0): items = frappe.db.sql(""" - SELECT - bom_item.item_code, + SELECT + bom_item.item_code, default_material_request_type, ifnull(%(parent_qty)s * sum(bom_item.qty/ifnull(bom.quantity, 1)), 0) as qty, - item.is_sub_contracted_item as is_sub_contracted, + item.is_sub_contracted_item as is_sub_contracted, item.default_bom as default_bom, - bom_item.description as description, - bom_item.stock_uom as stock_uom, - item.min_order_qty as min_order_qty + bom_item.description as description, + bom_item.stock_uom as stock_uom, + item.min_order_qty as min_order_qty FROM - `tabBOM Item` bom_item, - `tabBOM` bom, + `tabBOM Item` bom_item, + `tabBOM` bom, tabItem item where - bom.name = bom_item.parent - and bom.name = %(bom)s + bom.name = bom_item.parent + and bom.name = %(bom)s and bom_item.docstatus < 2 and bom_item.item_code = item.name """ + ("and item.is_stock_item = 1", "")[non_stock_item] + """ group by bom_item.item_code""", {"bom": bom, "parent_qty": parent_qty}, as_dict=1) - + for d in items: - if ((d.default_material_request_type == "Purchase" - and not (d.is_sub_contracted and only_raw and include_sublevel)) + if ((d.default_material_request_type == "Purchase" + and not (d.is_sub_contracted and only_raw and include_sublevel)) or (d.default_material_request_type == "Manufacture" and not only_raw)): if d.item_code in bom_wise_item_details: bom_wise_item_details[d.item_code].qty = bom_wise_item_details[d.item_code].qty + d.qty else: bom_wise_item_details[d.item_code] = d - + if include_sublevel: - if ((d.default_material_request_type == "Purchase" and d.is_sub_contracted and supply_subs) + if ((d.default_material_request_type == "Purchase" and d.is_sub_contracted and supply_subs) or (d.default_material_request_type == "Manufacture")): - + my_qty = 0 projected_qty = self.get_item_projected_qty(d.item_code) - + if self.create_material_requests_for_all_required_qty: my_qty = d.qty elif (bom_wise_item_details[d.item_code].qty - d.qty) < projected_qty: my_qty = bom_wise_item_details[d.item_code].qty - projected_qty else: my_qty = d.qty - + if my_qty > 0: - self.get_subitems(bom_wise_item_details, + self.get_subitems(bom_wise_item_details, d.default_bom, my_qty, include_sublevel, only_raw, supply_subs) return bom_wise_item_details @@ -408,12 +408,12 @@ class ProductionPlanningTool(Document): item_list.append([item, self.item_dict[item][0][1], self.item_dict[item][0][2], total_qty]) item_qty = frappe.db.sql("""select warehouse, indented_qty, ordered_qty, actual_qty from `tabBin` where item_code = %s""", item, as_dict=1) - + i_qty, o_qty, a_qty = 0, 0, 0 for w in item_qty: i_qty, o_qty, a_qty = i_qty + flt(w.indented_qty), o_qty + \ flt(w.ordered_qty), a_qty + flt(w.actual_qty) - + item_list.append(['', '', '', '', w.warehouse, flt(w.indented_qty), flt(w.ordered_qty), flt(w.actual_qty)]) if item_qty: @@ -485,15 +485,15 @@ class ProductionPlanningTool(Document): def get_item_projected_qty(self,item): item_projected_qty = frappe.db.sql(""" select ifnull(sum(projected_qty),0) as qty - from `tabBin` + from `tabBin` where item_code = %(item_code)s and warehouse=%(warehouse)s """, { - "item_code": item, + "item_code": item, "warehouse": self.purchase_request_for_warehouse }, as_dict=1) return item_projected_qty[0].qty - + def get_projected_qty(self): items = self.item_dict.keys() item_projected_qty = frappe.db.sql("""select item_code, sum(projected_qty) diff --git a/erpnext/manufacturing/doctype/workstation/workstation.json b/erpnext/manufacturing/doctype/workstation/workstation.json index 9f72e5ca006..38188be2aaf 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation.json +++ b/erpnext/manufacturing/doctype/workstation/workstation.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Workstation Name", @@ -79,6 +81,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, "label": "Description", @@ -109,6 +112,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -137,6 +141,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Holiday List", @@ -166,6 +171,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Operating Costs", @@ -195,6 +201,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Electricity Cost", @@ -225,6 +232,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Consumable Cost", @@ -254,6 +262,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -282,6 +291,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Rent Cost", @@ -312,6 +322,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Wages", @@ -342,6 +353,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Net Hour Rate", @@ -371,6 +383,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Working Hours", @@ -399,6 +412,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Working Hours", @@ -429,7 +443,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-12-13 05:04:54.668633", + "modified": "2017-02-17 17:26:57.238167", "modified_by": "Administrator", "module": "Manufacturing", "name": "Workstation", @@ -445,7 +459,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -460,6 +473,8 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 1, "sort_order": "ASC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/manufacturing/page/production_analytics/__init__.py b/erpnext/manufacturing/page/production_analytics/__init__.py new file mode 100644 index 00000000000..baffc488252 --- /dev/null +++ b/erpnext/manufacturing/page/production_analytics/__init__.py @@ -0,0 +1 @@ +from __future__ import unicode_literals diff --git a/erpnext/manufacturing/page/production_analytics/production_analytics.js b/erpnext/manufacturing/page/production_analytics/production_analytics.js new file mode 100644 index 00000000000..cac4b3a1f8c --- /dev/null +++ b/erpnext/manufacturing/page/production_analytics/production_analytics.js @@ -0,0 +1,158 @@ +// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +// License: GNU General Public License v3. See license.txt + +frappe.pages['production-analytics'].on_page_load = function(wrapper) { + frappe.ui.make_app_page({ + parent: wrapper, + title: __('Production Analytics'), + single_column: true + }); + + new erpnext.ProductionAnalytics(wrapper); + + + frappe.breadcrumbs.add("Manufacturing"); +} + +erpnext.ProductionAnalytics = frappe.views.GridReportWithPlot.extend({ + init: function(wrapper) { + this._super({ + title: __("Production Analytics"), + page: wrapper, + parent: $(wrapper).find('.layout-main'), + page: wrapper.page, + doctypes: ["Item", "Company", "Fiscal Year", "Production Order"] + }); + + }, + setup_columns: function() { + + var std_columns = [ + {id: "_check", name: __("Plot"), field: "_check", width: 30, + formatter: this.check_formatter}, + {id: "name", name: __("Status"), field: "name", width: 100}, + ]; + + this.make_date_range_columns(); + this.columns = std_columns.concat(this.columns); + }, + filters: [ + {fieldtype:"Select", label: __("Company"), link:"Company", fieldname: "company", + default_value: __("Select Company...")}, + {fieldtype:"Date", label: __("From Date"), fieldname: "from_date"}, + {fieldtype:"Date", label: __("To Date"), fieldname: "to_date"}, + {fieldtype:"Select", label: __("Range"), fieldname: "range", + options:[{label: __("Daily"), value: "Daily"}, {label: __("Weekly"), value: "Weekly"}, + {label: __("Monthly"), value: "Monthly"}, {label: __("Quarterly"), value: "Quarterly"}, + {label: __("Yearly"), value: "Yearly"}]} + ], + setup_filters: function() { + var me = this; + this._super(); + + this.trigger_refresh_on_change(["company"]); + this.trigger_refresh_on_change(["range"]); + + this.show_zero_check() + this.setup_chart_check(); + + }, + init_filter_values: function() { + this._super(); + this.filter_inputs.range.val('Monthly'); + }, + setup_chart: function() { + var me = this; + + var chart_data = this.get_chart_data ? this.get_chart_data() : null; + + this.chart = new frappe.ui.Chart({ + wrapper: this.chart_area, + data: chart_data + }); + }, + set_default_values: function() { + var values = { + from_date: dateutil.str_to_user(dateutil.add_months(dateutil.now_datetime(),-12) ), + to_date: dateutil.str_to_user(dateutil.add_months(dateutil.now_datetime(),1)) + } + + var me = this; + $.each(values, function(i, v) { + if(me.filter_inputs[i] && !me.filter_inputs[i].val()) + me.filter_inputs[i].val(v); + }) + }, + + prepare_data: function() { + // add Opening, Closing, Totals rows + // if filtered by account and / or voucher + var me = this; + var all_open_orders = {name:"All Production Orders", "id": "all-open-pos", + checked:true}; + var not_started = {name:"Not Started", "id":"not-started-pos", + checked:true}; + var overdue = {name:"Overdue (Not Started)", "id":"overdue-pos", + checked:true}; + var pending = {name:"Pending", "id":"pending-pos", + checked:true}; + var completed = {name:"Completed", "id":"completed-pos", + checked:true}; + + $.each(frappe.report_dump.data["Production Order"], function(i, d) { + var dateobj = dateutil.str_to_obj(d.creation); + var date = dateutil.str_to_user(d.creation.split(" ")[0]); + + $.each(me.columns, function(i,col) { + if (i > 1){ + var start_period = dateutil.user_to_obj(dateutil.str_to_user(col.id)); + var end_period = dateutil.user_to_obj(dateutil.str_to_user(col.name)); + var astart_date = dateutil.user_to_obj(dateutil.str_to_user(d.actual_start_date)); + var planned_start_date = dateutil.user_to_obj(dateutil.str_to_user(d.planned_start_date)); + var aend_date = dateutil.user_to_obj(dateutil.str_to_user(d.actual_end_date)); + var modified = dateutil.user_to_obj(dateutil.str_to_user(d.modified)); + + if (dateobj <= start_period || dateobj <= end_period) { + all_open_orders[col.field] = flt(all_open_orders[col.field]) + 1; + + if(d.status=="Completed") { + if(aend_date < start_period || modified < start_period) { + completed[col.field] = flt(completed[col.field]) + 1; + } + else if (astart_date < start_period) { + pending[col.field] = flt(pending[col.field]) + 1; + } + else if (planned_start_date < start_period) { + overdue[col.field] = flt(overdue[col.field]) + 1; + } else { + not_started[col.field] = flt(not_started[col.field]) + 1; + } + }else if(d.status == "In Process") + { + if (astart_date < start_period || modified < start_period){ + pending[col.field] = flt(pending[col.field]) + 1; + }else if (planned_start_date < start_period) { + overdue[col.field] = flt(overdue[col.field]) + 1; + }else{ + not_started[col.field] = flt(not_started[col.field]) + 1; + } + }else if(d.status == "Not Started") { + if (planned_start_date < start_period){ + overdue[col.field] = flt(overdue[col.field]) + 1; + }else{ + not_started[col.field] = flt(not_started[col.field]) + 1; + } + } + } + } + }); + }); + if(me.columns.length < 30){ + this.chart_area.toggle(true); + }else { + this.chart_area.toggle(false); + } + this.data = [all_open_orders, not_started, overdue, pending, completed]; + + } +}); diff --git a/erpnext/manufacturing/page/production_analytics/production_analytics.json b/erpnext/manufacturing/page/production_analytics/production_analytics.json new file mode 100644 index 00000000000..cd73bc826f8 --- /dev/null +++ b/erpnext/manufacturing/page/production_analytics/production_analytics.json @@ -0,0 +1,26 @@ +{ + "content": null, + "creation": "2012-09-21 20:15:16", + "docstatus": 0, + "doctype": "Page", + "icon": "fa fa-bar-chart", + "idx": 1, + "modified": "2017-02-20 17:33:05.913097", + "modified_by": "Administrator", + "module": "Manufacturing", + "name": "production-analytics", + "owner": "Administrator", + "page_name": "production-analytics", + "roles": [ + { + "role": "Analytics" + }, + { + "role": "Manufacturing Manager" + } + ], + "script": null, + "standard": "Yes", + "style": null, + "title": "Production Analytics" +} \ No newline at end of file diff --git a/erpnext/manufacturing/report/bom_stock_report/__init__.py b/erpnext/manufacturing/report/bom_stock_report/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js new file mode 100644 index 00000000000..8aed965ab82 --- /dev/null +++ b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js @@ -0,0 +1,17 @@ +frappe.query_reports["BOM Stock Report"] = { + "filters": [ + { + "fieldname":"bom", + "label": __("BOM"), + "fieldtype": "Link", + "options": "BOM", + "reqd": 1 + },{ + "fieldname":"warehouse", + "label": __("Warehouse"), + "fieldtype": "Link", + "options": "Warehouse", + "reqd": 1 + } + ] +} diff --git a/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.json b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.json new file mode 100644 index 00000000000..64d0ebbed46 --- /dev/null +++ b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.json @@ -0,0 +1,20 @@ +{ + "add_total_row": 0, + "apply_user_permissions": 1, + "creation": "2017-01-10 14:00:50.387244", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "letter_head": "Standard", + "modified": "2017-02-09 23:19:32.050905", + "modified_by": "Administrator", + "module": "Manufacturing", + "name": "BOM Stock Report", + "owner": "Administrator", + "query": "SELECT \n\tbom_item.item_code as \"Item:Link/Item:200\",\n\tbom_item.description as \"Description:Data:300\",\n\tbom_item.qty as \"Required Qty:Float:100\",\n\tledger.actual_qty as \"In Stock Qty:Float:100\",\n\tFLOOR(ledger.actual_qty /bom_item.qty) as \"Enough Parts to Build:Int:100\"\nFROM\n\t`tabBOM Item` AS bom_item \n\tLEFT JOIN `tabBin` AS ledger\t\n\t\tON bom_item.item_code = ledger.item_code \n\t\tAND ledger.warehouse = %(warehouse)s\nWHERE\n\tbom_item.parent=%(bom)s\n\nGROUP BY bom_item.item_code", + "ref_doctype": "BOM", + "report_name": "BOM Stock Report", + "report_type": "Query Report" +} \ No newline at end of file diff --git a/erpnext/manufacturing/report/production_order_stock_report/__init__.py b/erpnext/manufacturing/report/production_order_stock_report/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.js b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.js new file mode 100644 index 00000000000..917af5da9d2 --- /dev/null +++ b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.js @@ -0,0 +1,14 @@ +// Copyright (c) 2016, Velometro Mobility Inc and contributors +// For license information, please see license.txt + +frappe.query_reports["Production Order Stock Report"] = { + "filters": [ + { + "fieldname":"warehouse", + "label": __("Warehouse"), + "fieldtype": "Link", + "options": "Warehouse" + + } + ] +} diff --git a/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.json b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.json new file mode 100644 index 00000000000..1b1357e5669 --- /dev/null +++ b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.json @@ -0,0 +1,19 @@ +{ + "add_total_row": 0, + "apply_user_permissions": 1, + "creation": "2017-01-10 14:01:43.905861", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "letter_head": "Standard", + "modified": "2017-01-10 14:01:43.905861", + "modified_by": "Administrator", + "module": "Manufacturing", + "name": "Production Order Stock Report", + "owner": "Administrator", + "ref_doctype": "Production Order", + "report_name": "Production Order Stock Report", + "report_type": "Script Report" +} \ No newline at end of file diff --git a/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.py b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.py new file mode 100644 index 00000000000..6d586ddb223 --- /dev/null +++ b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.py @@ -0,0 +1,133 @@ +# Copyright (c) 2017, Velometro Mobility Inc and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +from frappe.utils import cint +import frappe + +def execute(filters=None): + prod_list = get_production_orders() + data = get_item_list(prod_list, filters) + columns = get_columns() + return columns, data + +def get_item_list(prod_list, filters): + out = [] + + #Add a row for each item/qty + for prod_order in prod_list: + prod_details = frappe.db.get_value("Production Order", prod_order.name, + ["bom_no", "source_warehouse", "qty", "produced_qty"], as_dict=1) + + desc = frappe.db.get_value("BOM", prod_details.bom_no, "description") + + item_list = frappe.db.sql("""SELECT + bom_item.item_code as item_code, + ifnull(ledger.actual_qty*bom.quantity/bom_item.qty,0) as build_qty + FROM + `tabBOM` as bom, `tabBOM Item` AS bom_item + LEFT JOIN `tabBin` AS ledger + ON bom_item.item_code = ledger.item_code + AND ledger.warehouse = ifnull(%(warehouse)s,%(filterhouse)s) + WHERE + bom.name = bom_item.parent + and bom.name = %(bom)s + GROUP BY + bom_item.item_code""", + {"bom": prod_details.bom_no, "warehouse": prod_details.source_warehouse, + "filterhouse": filters.warehouse}, as_dict=1) + + stock_qty = 0 + count = 0 + buildable_qty = prod_details.qty + for item in item_list: + count = count + 1 + if item.build_qty >= (prod_details.qty - prod_details.produced_qty): + stock_qty = stock_qty + 1 + elif buildable_qty >= item.build_qty: + buildable_qty = item.build_qty + + if count == stock_qty: + build = "Y" + else: + build = "N" + + row = frappe._dict({ + "production_order": prod_order.name, + "status": prod_order.status, + "req_items": cint(count), + "instock": stock_qty, + "description": desc, + "bom_no": prod_details.bom_no, + "qty": prod_details.qty, + "buildable_qty": buildable_qty, + "ready_to_build": build + }) + + out.append(row) + + return out + +def get_production_orders(): + + out = frappe.get_all("Production Order", filters={"docstatus": 1, "status": ( "!=","Completed")}, fields=["name","status"], order_by='name') + return out + +def get_columns(): + columns = [{ + "fieldname": "production_order", + "label": "Production Order", + "fieldtype": "Link", + "options": "Production Order", + "width": 110 + }, { + "fieldname": "bom_no", + "label": "BOM", + "fieldtype": "Link", + "options": "BOM", + "width": 120 + }, { + "fieldname": "description", + "label": "Description", + "fieldtype": "Data", + "options": "", + "width": 230 + }, { + "fieldname": "qty", + "label": "Qty to Build", + "fieldtype": "Data", + "options": "", + "width": 110 + }, { + "fieldname": "status", + "label": "Status", + "fieldtype": "Data", + "options": "", + "width": 100 + }, { + "fieldname": "req_items", + "label": "# Req'd Items", + "fieldtype": "Data", + "options": "", + "width": 105 + }, { + "fieldname": "instock", + "label": "# In Stock", + "fieldtype": "Data", + "options": "", + "width": 105 + }, { + "fieldname": "buildable_qty", + "label": "Buildable Qty", + "fieldtype": "Data", + "options": "", + "width": 100 + }, { + "fieldname": "ready_to_build", + "label": "Build All?", + "fieldtype": "Data", + "options": "", + "width": 90 + }] + + return columns diff --git a/erpnext/patches.txt b/erpnext/patches.txt index e041a2b5178..59b2ca07aa7 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -370,4 +370,11 @@ erpnext.patches.v7_2.set_null_value_to_fields erpnext.patches.v7_2.update_guardian_name_in_student_master erpnext.patches.v7_2.update_abbr_in_salary_slips erpnext.patches.v7_2.rename_evaluation_criteria -erpnext.patches.v7_2.update_party_type \ No newline at end of file +erpnext.patches.v7_2.update_party_type +erpnext.patches.v7_2.setup_auto_close_settings +erpnext.patches.v7_2.empty_supplied_items_for_non_subcontracted +erpnext.patches.v7_2.arrear_leave_encashment_as_salary_component +erpnext.patches.v7_2.rename_att_date_attendance +erpnext.patches.v7_2.update_attendance_docstatus +erpnext.patches.v7_2.move_dates_from_salary_structure_to_employee +erpnext.patches.v7_2.make_all_assessment_group diff --git a/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py b/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py new file mode 100644 index 00000000000..13a2bb8d5a9 --- /dev/null +++ b/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py @@ -0,0 +1,33 @@ +import frappe + +def execute(): + frappe.reload_doctype('Salary Slip', 'Salary Component') + salary_components = [['Arrear', "ARR"], ['Leave Encashment', 'LENC']] + for salary_component, salary_abbr in salary_components: + if not frappe.db.exists('Salary Component', salary_component): + sal_comp = frappe.get_doc({ + "doctype": "Salary Component", + "salary_component": salary_component, + "type": "Earning", + "salary_component_abbr": salary_abbr + }).insert() + + salary_slips = frappe.db.sql("""select name, arrear_amount, leave_encashment_amount from `tabSalary Slip` + where docstatus !=2 and (arrear_amount > 0 or leave_encashment_amount > 0)""", as_dict=True) + + for salary_slip in salary_slips: + doc = frappe.get_doc('Salary Slip', salary_slip.name) + + if salary_slip.get("arrear_amount") > 0: + r = doc.append('earnings', { + 'salary_component': 'Arrear', + 'amount': salary_slip.arrear_amount + }) + r.db_update() + + if salary_slip.get("leave_encashment_amount") > 0: + r = doc.append('earnings', { + 'salary_component': 'Leave Encashment', + 'amount': salary_slip.leave_encashment_amount + }) + r.db_update() \ No newline at end of file diff --git a/erpnext/patches/v7_2/empty_supplied_items_for_non_subcontracted.py b/erpnext/patches/v7_2/empty_supplied_items_for_non_subcontracted.py new file mode 100644 index 00000000000..ec6f8afc3a5 --- /dev/null +++ b/erpnext/patches/v7_2/empty_supplied_items_for_non_subcontracted.py @@ -0,0 +1,14 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + for doctype in ["Purchase Order", "Purchase Invoice", "Purchase Receipt"]: + child_table = 'Purchase Receipt Item Supplied' if doctype != 'Purchase Order' else 'Purchase Order Item Supplied' + for data in frappe.db.sql(""" select distinct `tab{doctype}`.name from `tab{doctype}` , `tab{child_table}` + where `tab{doctype}`.name = `tab{child_table}`.parent and `tab{doctype}`.docstatus != 2 + and `tab{doctype}`.is_subcontracted = 'No' """.format(doctype = doctype, child_table = child_table), as_dict=1): + frappe.db.sql(""" delete from `tab{child_table}` + where parent = %s and parenttype = %s""".format(child_table= child_table), (data.name, doctype)) \ No newline at end of file diff --git a/erpnext/patches/v7_2/make_all_assessment_group.py b/erpnext/patches/v7_2/make_all_assessment_group.py new file mode 100644 index 00000000000..769e503f6db --- /dev/null +++ b/erpnext/patches/v7_2/make_all_assessment_group.py @@ -0,0 +1,13 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + if not frappe.db.exists({"doctype": "Assessment Group","assessment_group_name": "All Assessment Groups"}): + doc = frappe.new_doc("Assessment Group") + doc.assessment_group_name = "All Assessment Groups" + doc.is_group = 1 + doc.flags.ignore_mandatory = True + doc.save() \ No newline at end of file diff --git a/erpnext/patches/v7_2/move_dates_from_salary_structure_to_employee.py b/erpnext/patches/v7_2/move_dates_from_salary_structure_to_employee.py new file mode 100644 index 00000000000..98e076e060e --- /dev/null +++ b/erpnext/patches/v7_2/move_dates_from_salary_structure_to_employee.py @@ -0,0 +1,9 @@ +import frappe + +def execute(): + frappe.reload_doc('hr', 'doctype', 'salary_structure_employee') + salary_structures = frappe.db.sql("""select name, to_date, from_date from `tabSalary Structure`""", as_dict=True) + + for salary_structure in salary_structures: + frappe.db.sql(""" update `tabSalary Structure Employee` set from_date = %s, to_date = %s + where parent = %s """, (salary_structure.from_date, salary_structure.to_date or 'null', salary_structure.name)) \ No newline at end of file diff --git a/erpnext/patches/v7_2/rename_att_date_attendance.py b/erpnext/patches/v7_2/rename_att_date_attendance.py new file mode 100644 index 00000000000..f7caf706db5 --- /dev/null +++ b/erpnext/patches/v7_2/rename_att_date_attendance.py @@ -0,0 +1,14 @@ +import frappe +from frappe.model.utils.rename_field import update_reports, update_users_report_view_settings, update_property_setters + +def execute(): + if "att_date" not in frappe.db.get_table_columns("Attendance"): + return + frappe.reload_doc("hr", "doctype", "attendance") + frappe.db.sql("""update `tabAttendance` + set attendance_date = att_date + where attendance_date is null or attendance_date = '' or attendance_date = '0000-00-00'""") + + update_reports("Attendance", "att_date", "attendance_date") + update_users_report_view_settings("Attendance", "att_date", "attendance_date") + update_property_setters("Attendance", "att_date", "attendance_date") diff --git a/erpnext/patches/v7_2/setup_auto_close_settings.py b/erpnext/patches/v7_2/setup_auto_close_settings.py new file mode 100644 index 00000000000..4eef2b9c8a7 --- /dev/null +++ b/erpnext/patches/v7_2/setup_auto_close_settings.py @@ -0,0 +1,18 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + # update the selling settings and set the close_opportunity_after_days + frappe.reload_doc("selling", "doctype", "selling_settings") + frappe.db.set_value("Selling Settings", "Selling Settings", "close_opportunity_after_days", 15) + + # Auto close Replied opportunity + frappe.db.sql("""update `tabOpportunity` set status='Closed' where status='Replied' + and date_sub(curdate(), interval 15 Day)>modified""") + + # create Support Settings doctype and update close_issue_after_days + frappe.reload_doc("support", "doctype", "support_settings") + frappe.db.set_value("Support Settings", "Support Settings", "close_issue_after_days", 7) \ No newline at end of file diff --git a/erpnext/patches/v7_2/update_attendance_docstatus.py b/erpnext/patches/v7_2/update_attendance_docstatus.py new file mode 100644 index 00000000000..6fbab019f59 --- /dev/null +++ b/erpnext/patches/v7_2/update_attendance_docstatus.py @@ -0,0 +1,10 @@ +import frappe + +def execute(): + frappe.reload_doctype('Student Attendance') + # frappe.reload_doc("schools", "doctype", "student_attendance") + frappe.db.sql(''' + update `tabStudent Attendance` set + docstatus=0 + where + docstatus=1''') \ No newline at end of file diff --git a/erpnext/projects/doctype/project/project.json b/erpnext/projects/doctype/project/project.json index 38ebbcb4f88..dbdffdf1cdd 100644 --- a/erpnext/projects/doctype/project/project.json +++ b/erpnext/projects/doctype/project/project.json @@ -24,7 +24,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Project Name", "length": 0, "no_copy": 0, @@ -51,8 +53,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Status", "length": 0, "no_copy": 1, @@ -81,7 +85,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Project Type", "length": 0, "no_copy": 0, @@ -110,7 +116,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Is Active", "length": 0, "no_copy": 0, @@ -140,7 +148,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "% Complete Method", "length": 0, "no_copy": 0, @@ -168,7 +178,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -194,7 +206,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Priority", "length": 0, "no_copy": 0, @@ -222,8 +236,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Expected Start Date", "length": 0, "no_copy": 0, @@ -251,7 +267,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Expected End Date", "length": 0, "no_copy": 0, @@ -279,7 +297,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "% Completed", "length": 0, "no_copy": 1, @@ -305,7 +325,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Customer Details", "length": 0, "no_copy": 0, @@ -332,8 +354,10 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, + "in_standard_filter": 0, "label": "Customer", "length": 0, "no_copy": 0, @@ -362,7 +386,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -388,7 +414,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Sales Order", "length": 0, "no_copy": 0, @@ -416,7 +444,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Users", "length": 0, "no_copy": 0, @@ -444,7 +474,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Users", "length": 0, "no_copy": 0, @@ -472,7 +504,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Tasks", "length": 0, "no_copy": 0, @@ -500,7 +534,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Tasks", "length": 0, "no_copy": 0, @@ -528,7 +564,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Notes", "length": 0, "no_copy": 0, @@ -556,7 +594,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Notes", "length": 0, "no_copy": 0, @@ -584,7 +624,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Start and End Dates", "length": 0, "no_copy": 0, @@ -611,7 +653,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Actual Start Date", "length": 0, "no_copy": 0, @@ -638,7 +682,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Actual Time (in Hours)", "length": 0, "no_copy": 0, @@ -665,7 +711,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -691,7 +739,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Actual End Date", "length": 0, "no_copy": 0, @@ -719,7 +769,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Costing and Billing", "length": 0, "no_copy": 0, @@ -747,7 +799,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Estimated Cost", "length": 0, "no_copy": 0, @@ -777,7 +831,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Total Costing Amount (via Time Logs)", "length": 0, "no_copy": 0, @@ -805,7 +861,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Total Expense Claim (via Expense Claims)", "length": 0, "no_copy": 0, @@ -832,7 +890,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Company", "length": 0, "no_copy": 0, @@ -859,7 +919,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Default Cost Center", "length": 0, "no_copy": 0, @@ -886,7 +948,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -913,7 +977,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Total Billing Amount (via Time Logs)", "length": 0, "no_copy": 0, @@ -940,7 +1006,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Total Purchase Cost (via Purchase Invoice)", "length": 0, "no_copy": 0, @@ -967,7 +1035,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Margin", "length": 0, "no_copy": 0, @@ -995,7 +1065,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Gross Margin", "length": 0, "no_copy": 0, @@ -1024,7 +1096,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -1050,7 +1124,9 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Gross Margin %", "length": 0, "no_copy": 0, @@ -1080,7 +1156,7 @@ "issingle": 0, "istable": 0, "max_attachments": 4, - "modified": "2017-01-10 16:33:54.691885", + "modified": "2017-02-17 17:24:04.146872", "modified_by": "Administrator", "module": "Projects", "name": "Project", @@ -1096,7 +1172,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1117,7 +1192,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -1138,7 +1212,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -1154,7 +1227,9 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "customer, status, priority, is_active", + "show_name_in_global_search": 1, "sort_order": "DESC", "timeline_field": "customer", + "track_changes": 0, "track_seen": 1 } \ No newline at end of file diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index 37fcc113a6c..b5ef4bfd764 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -119,6 +119,8 @@ class Project(Document): def update_percent_complete(self): total = frappe.db.sql("""select count(name) from tabTask where project=%s""", self.name)[0][0] + if not total and self.percent_complete: + self.percent_complete = 0 if (self.percent_complete_method == "Task Completion" and total > 0) or (not self.percent_complete_method and total > 0): completed = frappe.db.sql("""select count(name) from tabTask where project=%s and status in ('Closed', 'Cancelled')""", self.name)[0][0] diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js index 7c4eb80fc58..df38cfe1bd5 100644 --- a/erpnext/projects/doctype/task/task.js +++ b/erpnext/projects/doctype/task/task.js @@ -6,6 +6,18 @@ frappe.provide("erpnext.projects"); cur_frm.add_fetch("project", "company", "company"); frappe.ui.form.on("Task", { + onload: function(frm) { + frm.set_query("task", "depends_on", function() { + var filters = { + name: ["!=", frm.doc.name] + }; + if(frm.doc.project) filters["project"] = frm.doc.project; + return { + filters: filters + }; + }) + }, + refresh: function(frm) { var doc = frm.doc; if(doc.__islocal) { @@ -14,7 +26,6 @@ frappe.ui.form.on("Task", { } } - if(!doc.__islocal) { if(frappe.model.can_read("Timesheet")) { frm.add_custom_button(__("Timesheet"), function() { @@ -67,12 +78,5 @@ frappe.ui.form.on("Task", { }); -cur_frm.fields_dict['depends_on'].grid.get_field('task').get_query = function(doc) { - if(doc.project) { - return { - filters: {'project': doc.project} - } - } -} - cur_frm.add_fetch('task', 'subject', 'subject'); +cur_frm.add_fetch('task', 'project', 'project'); diff --git a/erpnext/projects/doctype/task/task.json b/erpnext/projects/doctype/task/task.json index 74332225384..f9485e92393 100644 --- a/erpnext/projects/doctype/task/task.json +++ b/erpnext/projects/doctype/task/task.json @@ -21,7 +21,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Subject", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 1, "label": "Project", @@ -81,6 +83,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -110,6 +113,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Status", @@ -139,7 +143,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Priority", @@ -170,6 +175,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -197,6 +203,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Expected Start Date", @@ -228,6 +235,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Expected Time (in hours)", @@ -257,6 +265,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Weight", @@ -285,6 +294,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -311,7 +321,8 @@ "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, - "in_filter": 1, + "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Expected End Date", @@ -341,6 +352,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "% Progress", @@ -369,6 +381,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -397,6 +410,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Details", @@ -428,6 +442,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Depends On", @@ -456,6 +471,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "depends_on", @@ -480,21 +496,22 @@ "collapsible": 0, "columns": 0, "fieldname": "depends_on_tasks", - "fieldtype": "Read Only", + "fieldtype": "Data", "hidden": 1, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "depends_on_tasks", + "label": "Depends on Tasks", "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, - "read_only": 0, + "read_only": 1, "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, @@ -514,6 +531,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -544,6 +562,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Actual Start Date (via Time Sheet)", @@ -575,6 +594,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Actual Time (in hours)", @@ -604,6 +624,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -631,6 +652,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Actual End Date (via Time Sheet)", @@ -660,6 +682,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -687,6 +710,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Costing Amount (via Time Sheet)", @@ -717,6 +741,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Expense Claim (via Expense Claim)", @@ -746,6 +771,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -773,6 +799,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Billing Amount (via Time Sheet)", @@ -801,6 +828,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "", @@ -829,6 +857,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Review Date", @@ -859,6 +888,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Closing Date", @@ -888,6 +918,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -914,6 +945,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -944,7 +976,7 @@ "istable": 0, "max_attachments": 5, "menu_index": 0, - "modified": "2017-01-27 01:26:24.985167", + "modified": "2017-02-24 01:47:05.438887", "modified_by": "Administrator", "module": "Projects", "name": "Task", @@ -975,6 +1007,7 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "subject", + "show_name_in_global_search": 0, "sort_order": "DESC", "timeline_field": "project", "title_field": "subject", diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index 2bdcaf9ac18..44c81a67c51 100644 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -105,16 +105,18 @@ class Task(Document): def reschedule_dependent_tasks(self): end_date = self.exp_end_date or self.act_end_date if end_date: - for task_name in frappe.db.sql("select name from `tabTask` as parent where %s in \ - (select task from `tabTask Depends On` as child where parent.name = child.parent )", self.name, as_dict=1): + for task_name in frappe.db.sql("""select name from `tabTask` as parent where parent.project = %(project)s and parent.name in \ + (select parent from `tabTask Depends On` as child where child.task = %(task)s and child.project = %(project)s)""", + {'project': self.project, 'task':self.name }, as_dict=1): + task = frappe.get_doc("Task", task_name.name) - if task.exp_start_date and task.exp_end_date and task.exp_start_date < getdate(end_date) and task.status == "Open" : + if task.exp_start_date and task.exp_end_date and task.exp_start_date < getdate(end_date) and task.status == "Open": task_duration = date_diff(task.exp_end_date, task.exp_start_date) task.exp_start_date = add_days(end_date, 1) task.exp_end_date = add_days(task.exp_start_date, task_duration) task.flags.ignore_recursion_check = True task.save() - + def has_webform_permission(doc): project_user = frappe.db.get_value("Project User", {"parent": doc.project, "user":frappe.session.user} , "user") if project_user: diff --git a/erpnext/projects/doctype/task/test_task.py b/erpnext/projects/doctype/task/test_task.py index 45bcd8214fd..2e64b7367dc 100644 --- a/erpnext/projects/doctype/task/test_task.py +++ b/erpnext/projects/doctype/task/test_task.py @@ -16,6 +16,7 @@ class TestTask(unittest.TestCase): task1.update({ "status": "Open", "subject": "_Test Task 1", + "project": "_Test Project", "exp_start_date": "2015-1-1", "exp_end_date": "2015-1-10" }) @@ -25,6 +26,7 @@ class TestTask(unittest.TestCase): task2.update({ "status": "Open", "subject": "_Test Task 2", + "project": "_Test Project", "exp_start_date": "2015-1-11", "exp_end_date": "2015-1-15", "depends_on":[ @@ -39,6 +41,7 @@ class TestTask(unittest.TestCase): task3.update({ "status": "Open", "subject": "_Test Task 2", + "project": "_Test Project", "exp_start_date": "2015-1-11", "exp_end_date": "2015-1-15", "depends_on":[ @@ -80,6 +83,7 @@ class TestTask(unittest.TestCase): task1.update({ "status": "Open", "subject": "_Test Task 1", + "project": "_Test Project", "exp_start_date": "2015-1-1", "exp_end_date": "2015-1-10" }) @@ -89,11 +93,13 @@ class TestTask(unittest.TestCase): task2.update({ "status": "Open", "subject": "_Test Task 2", + "project": "_Test Project", "exp_start_date": "2015-1-11", "exp_end_date": "2015-1-15", "depends_on":[ { - "task": task1.name + "task": task1.name, + "project": "_Test Project" } ] }) @@ -103,11 +109,13 @@ class TestTask(unittest.TestCase): task3.update({ "status": "Open", "subject": "_Test Task 3", + "project": "_Test Project", "exp_start_date": "2015-1-16", "exp_end_date": "2015-1-18", "depends_on":[ { - "task": task2.name + "task": task2.name, + "project": "_Test Project" } ] }) diff --git a/erpnext/projects/doctype/task_depends_on/task_depends_on.json b/erpnext/projects/doctype/task_depends_on/task_depends_on.json index ad6869b662c..25657afa92d 100644 --- a/erpnext/projects/doctype/task_depends_on/task_depends_on.json +++ b/erpnext/projects/doctype/task_depends_on/task_depends_on.json @@ -14,13 +14,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "task", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Task", "length": 0, "no_copy": 0, @@ -30,6 +33,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -40,13 +44,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "column_break_2", "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -54,6 +61,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -64,13 +72,16 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "subject", "fieldtype": "Text", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Subject", "length": 0, "no_copy": 0, @@ -80,6 +91,36 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "project", + "fieldtype": "Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Project", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -97,7 +138,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-07-11 03:28:09.329158", + "modified": "2017-02-24 04:56:04.862502", "modified_by": "Administrator", "module": "Projects", "name": "Task Depends On", @@ -107,7 +148,9 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py index 11d0b1ce6ee..1db0610e89c 100644 --- a/erpnext/projects/doctype/timesheet/test_timesheet.py +++ b/erpnext/projects/doctype/timesheet/test_timesheet.py @@ -7,7 +7,7 @@ import frappe import unittest import datetime from frappe.utils.make_random import get_random -from frappe.utils import now_datetime, nowdate, add_days +from frappe.utils import now_datetime, nowdate, add_days, add_months from erpnext.projects.doctype.timesheet.timesheet import OverlapError from erpnext.projects.doctype.timesheet.timesheet import make_salary_slip, make_sales_invoice from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice @@ -88,7 +88,8 @@ def make_salary_structure(employee): es = salary_structure.append('employees', { "employee": employee, - "base": 1200 + "base": 1200, + "from_date": add_months(nowdate(),-1) }) diff --git a/erpnext/projects/doctype/timesheet/timesheet.json b/erpnext/projects/doctype/timesheet/timesheet.json index 8762a23cf99..2fd544bae9c 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.json +++ b/erpnext/projects/doctype/timesheet/timesheet.json @@ -23,6 +23,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Series", @@ -51,6 +52,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Company", @@ -82,6 +84,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Sales Invoice", @@ -110,6 +113,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -137,6 +141,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Salary Slip", @@ -167,6 +172,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Status", @@ -197,6 +203,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Detail", @@ -227,6 +234,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 1, "label": "Employee", @@ -257,6 +265,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Employee Name", @@ -286,6 +295,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "User", @@ -315,6 +325,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -342,6 +353,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Start Date", @@ -370,6 +382,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "End Date", @@ -400,6 +413,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Production Detail", @@ -428,6 +442,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Production Order", @@ -457,6 +472,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -483,6 +499,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Time Sheets", @@ -511,6 +528,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -540,7 +558,8 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_list_view": 1, + "in_global_search": 0, + "in_list_view": 0, "in_standard_filter": 0, "label": "Total Working Hours", "length": 0, @@ -567,6 +586,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Billing Details", @@ -595,6 +615,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Billable Hours", @@ -623,7 +644,8 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_list_view": 0, + "in_global_search": 0, + "in_list_view": 1, "in_standard_filter": 0, "label": "Total Billed Hours", "length": 0, @@ -651,6 +673,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Costing Amount", @@ -679,6 +702,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -709,6 +733,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Billable Amount", @@ -737,6 +762,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Total Billed Amount", @@ -765,6 +791,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "% Amount Billed", @@ -793,6 +820,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -820,6 +848,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Note", @@ -848,6 +877,7 @@ "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Amended From", @@ -877,7 +907,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-23 17:35:51.194690", + "modified": "2017-02-17 17:23:35.196740", "modified_by": "Administrator", "module": "Projects", "name": "Timesheet", @@ -893,7 +923,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -914,7 +943,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -935,7 +963,6 @@ "export": 1, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -956,7 +983,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -977,7 +1003,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 0, "read": 1, @@ -998,7 +1023,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 1, "print": 0, "read": 1, @@ -1013,6 +1037,8 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_order": "ASC", + "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/projects/doctype/timesheet/timesheet_calendar.js b/erpnext/projects/doctype/timesheet/timesheet_calendar.js index 0af1a6c58eb..14f016a7653 100644 --- a/erpnext/projects/doctype/timesheet/timesheet_calendar.js +++ b/erpnext/projects/doctype/timesheet/timesheet_calendar.js @@ -4,7 +4,6 @@ frappe.views.calendar["Timesheet"] = { "end": "end_date", "name": "parent", "id": "name", - "title": "name", "allDay": "allDay", "child_name": "name", "title": "title" diff --git a/erpnext/public/css/website.css b/erpnext/public/css/website.css index 1617ea7bd13..0370dd023b2 100644 --- a/erpnext/public/css/website.css +++ b/erpnext/public/css/website.css @@ -250,3 +250,24 @@ .product-image-wrapper { padding-bottom: 40px; } +.duration-bar { + display: inline-block; + color: white; + background: #8FD288; + padding: 3px; +} +.duration-invisible { + visibility: hidden; +} +.duration-value { + float: right; +} +.bar-outer-text { + color: #8FD288; + background: none; + float: none; + border: none; +} +.bom-spec { + margin-bottom: 20px; +} diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 799730edd57..4e082870042 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -781,7 +781,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ if(k=="price_list_rate") { if(flt(v) != flt(d.price_list_rate)) price_list_rate_changed = true; } - frappe.model.set_value(d.doctype, d.name, k, v); + if(v) { + frappe.model.set_value(d.doctype, d.name, k, v); + } } } diff --git a/erpnext/public/js/queries.js b/erpnext/public/js/queries.js index f3167bb620c..bf7143a10ec 100644 --- a/erpnext/public/js/queries.js +++ b/erpnext/public/js/queries.js @@ -133,3 +133,19 @@ erpnext.queries.setup_queries = function(frm, options, query_fn) { set_query(df.options, df.fieldname); }); } + +/* if item code is selected in child table + then list down warehouses with its quantity + else apply default filters. +*/ +erpnext.queries.setup_warehouse_query = function(frm){ + frm.set_query('warehouse', 'items', function(doc, cdt, cdn) { + var row = locals[cdt][cdn]; + var filters = erpnext.queries.warehouse(frm.doc); + if(row.item_code){ + $.extend(filters, {"query":"erpnext.controllers.queries.warehouse_query"}); + filters["filters"].push(["Bin", "item_code", "=", row.item_code]); + } + return filters + }); +} diff --git a/erpnext/public/js/schools/student_button.html b/erpnext/public/js/schools/student_button.html index dabaf2660ef..4196808355a 100644 --- a/erpnext/public/js/schools/student_button.html +++ b/erpnext/public/js/schools/student_button.html @@ -1,5 +1,5 @@
-
+