From 020c6e9175fe4e743efb9424e1e20fb412052253 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Wed, 24 Jun 2020 15:22:45 +0530 Subject: [PATCH 01/24] fix: Create salary slip button disappears --- .../doctype/payroll_entry/payroll_entry.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/erpnext/payroll/doctype/payroll_entry/payroll_entry.js b/erpnext/payroll/doctype/payroll_entry/payroll_entry.js index 1ae3553b9b..0415ebf2fc 100644 --- a/erpnext/payroll/doctype/payroll_entry/payroll_entry.js +++ b/erpnext/payroll/doctype/payroll_entry/payroll_entry.js @@ -30,6 +30,7 @@ frappe.ui.form.on('Payroll Entry', { ).toggleClass('btn-primary', !(frm.doc.employees || []).length); } if ((frm.doc.employees || []).length) { + frm.page.clear_primary_action(); frm.page.set_primary_action(__('Create Salary Slips'), () => { frm.save('Submit').then(()=>{ frm.page.clear_primary_action(); @@ -49,13 +50,14 @@ frappe.ui.form.on('Payroll Entry', { return frappe.call({ doc: frm.doc, method: 'fill_employee_details', - callback: function(r) { - if (r.docs[0].employees){ - frm.save(); - frm.refresh(); - if(r.docs[0].validate_attendance){ - render_employee_attendance(frm, r.message); - } + }).then(r => { + if (r.docs[0].employees){ + frm.employees = r.docs[0].employees; + frm.dirty(); + frm.save(); + frm.refresh(); + if(r.docs[0].validate_attendance){ + render_employee_attendance(frm, r.message); } } }) From d1bf6e027734a57b1ca6b73b9db84dabc744cbd5 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 29 Jun 2020 21:14:03 +0530 Subject: [PATCH 02/24] fix: Do not ignore validate methods on GLL entry submit --- erpnext/accounts/general_ledger.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index bfe35ab006..da9123b92a 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -140,10 +140,8 @@ def make_entry(args, adv_adj, update_outstanding): gle = frappe.new_doc("GL Entry") gle.update(args) gle.flags.ignore_permissions = 1 - gle.validate() gle.db_insert() gle.run_method("on_update_with_args", adv_adj, update_outstanding) - gle.flags.ignore_validate = True gle.submit() # check against budget From 8230e41a4202924b24521dc51543b2412d9f56db Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 29 Jun 2020 21:20:05 +0530 Subject: [PATCH 03/24] fix: Insert instead of DB insert --- erpnext/accounts/general_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index da9123b92a..a245d63f52 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -140,7 +140,7 @@ def make_entry(args, adv_adj, update_outstanding): gle = frappe.new_doc("GL Entry") gle.update(args) gle.flags.ignore_permissions = 1 - gle.db_insert() + gle.insert() gle.run_method("on_update_with_args", adv_adj, update_outstanding) gle.submit() From 8f2cb0beb6f2774a21b95573a86aee6fbd95d956 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Tue, 30 Jun 2020 12:11:03 +0530 Subject: [PATCH 04/24] fix: set half day date None if half day is unchecked --- erpnext/hr/doctype/leave_application/leave_application.js | 2 ++ erpnext/hr/doctype/leave_application/leave_application.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js index fb1f2c00b1..9413120bc5 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.js +++ b/erpnext/hr/doctype/leave_application/leave_application.js @@ -40,6 +40,8 @@ frappe.ui.form.on("Leave Application", { validate: function(frm) { if (frm.doc.from_date == frm.doc.to_date && frm.doc.half_day == 1){ frm.doc.half_day_date = frm.doc.from_date; + }else if (frm.doc.half_day == 0){ + frm.doc.half_day_date = undefined; } frm.toggle_reqd("half_day_date", frm.doc.half_day == 1); }, diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index 0423824c0e..3f25f58383 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -293,6 +293,8 @@ class LeaveApplication(Document): def set_half_day_date(self): if self.from_date == self.to_date and self.half_day == 1: self.half_day_date = self.from_date + elif self.half_day == 0: + self.half_day_date = None def notify_employee(self): employee = frappe.get_doc("Employee", self.employee) From d7adacd3e290db5cc1318ebddeb0ea27e6d2fb5b Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 3 Jul 2020 18:39:51 +0530 Subject: [PATCH 05/24] feat: Added all companies option in employee tree to view employee accress all companies --- erpnext/hr/doctype/employee/employee.py | 6 +++++- erpnext/hr/doctype/employee/employee_tree.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py index 4d49503d2d..7338cbb6c8 100755 --- a/erpnext/hr/doctype/employee/employee.py +++ b/erpnext/hr/doctype/employee/employee.py @@ -413,7 +413,11 @@ def get_employee_emails(employee_list): @frappe.whitelist() def get_children(doctype, parent=None, company=None, is_root=False, is_tree=False): - filters = [['company', '=', company]] + + filters = [] + if company and company != 'All Companies': + filters = [['company', '=', company]] + fields = ['name as value', 'employee_name as title'] if is_root: diff --git a/erpnext/hr/doctype/employee/employee_tree.js b/erpnext/hr/doctype/employee/employee_tree.js index 0a2da63058..9ab091a1eb 100644 --- a/erpnext/hr/doctype/employee/employee_tree.js +++ b/erpnext/hr/doctype/employee/employee_tree.js @@ -4,7 +4,7 @@ frappe.treeview_settings['Employee'] = { { fieldname: "company", fieldtype:"Select", - options: erpnext.utils.get_tree_options("company"), + options: ['All Companies'].concat(erpnext.utils.get_tree_options("company")), label: __("Company"), default: erpnext.utils.get_tree_default("company") } From e88f2bb05325c267ee28d5221aae53c0a6d8ffd5 Mon Sep 17 00:00:00 2001 From: Anupam K Date: Mon, 6 Jul 2020 12:34:05 +0530 Subject: [PATCH 06/24] number card filter --- erpnext/crm/dashboard_fixtures.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/erpnext/crm/dashboard_fixtures.py b/erpnext/crm/dashboard_fixtures.py index 0535cbbcc9..901c0581f4 100644 --- a/erpnext/crm/dashboard_fixtures.py +++ b/erpnext/crm/dashboard_fixtures.py @@ -172,7 +172,9 @@ def get_number_cards(): "doctype": "Number Card", "document_type": "Lead", "name": "New Lead (Last 1 Month)", - "filters_json": json.dumps([["Lead","creation","Previous","1 month",False]]), + "filters_json": json.dumps([ + ["Lead", "creation", "Timespan", "last month"] + ]), "function": "Count", "is_public": 1, "label": _("New Lead (Last 1 Month)"), @@ -183,7 +185,9 @@ def get_number_cards(): "doctype": "Number Card", "document_type": "Opportunity", "name": "New Opportunity (Last 1 Month)", - "filters_json": json.dumps([["Opportunity","creation","Previous","1 month",False]]), + "filters_json": json.dumps([ + ["Opportunity", "creation", "Timespan", "last month"] + ]), "function": "Count", "is_public": 1, "label": _("New Opportunity (Last 1 Month)"), @@ -194,7 +198,10 @@ def get_number_cards(): "doctype": "Number Card", "document_type": "Opportunity", "name": "Won Opportunity (Last 1 Month)", - "filters_json": json.dumps([["Opportunity","creation","Previous","1 month",False]]), + "filters_json": json.dumps([ + ["Opportunity", "status", "=", "Converted",False], + ["Opportunity", "creation", "Timespan", "last month"] + ]), "function": "Count", "is_public": 1, "label": _("Won Opportunity (Last 1 Month)"), From f642be97270373043e99370e79a9b952d347c00a Mon Sep 17 00:00:00 2001 From: Mitali Deshpande Date: Tue, 7 Jul 2020 15:59:41 +0530 Subject: [PATCH 07/24] fix: Changed error message in the Product Bundle --- erpnext/selling/doctype/product_bundle/product_bundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.py b/erpnext/selling/doctype/product_bundle/product_bundle.py index c8a71677f9..55580c4671 100644 --- a/erpnext/selling/doctype/product_bundle/product_bundle.py +++ b/erpnext/selling/doctype/product_bundle/product_bundle.py @@ -26,7 +26,7 @@ class ProductBundle(Document): def validate_child_items(self): for item in self.items: if frappe.db.exists("Product Bundle", item.item_code): - frappe.throw(_("Child Item should not be a Product Bundle. Please remove item `{0}` and save").format(item.item_code)) + frappe.throw(_("Row #{0}: Child Item should not be a Product Bundle. Please remove item `{1}` and Save").format(item.idx, frappe.bold(item.item_code))) def get_new_item_code(doctype, txt, searchfield, start, page_len, filters): from erpnext.controllers.queries import get_match_cond From 8bc92b90f5cfa45aba101aa674962487b938968a Mon Sep 17 00:00:00 2001 From: Anupam K Date: Wed, 8 Jul 2020 00:56:21 +0530 Subject: [PATCH 08/24] updating lead.py --- erpnext/crm/doctype/lead/lead.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py index ec7d14d6ae..315d298eb4 100644 --- a/erpnext/crm/doctype/lead/lead.py +++ b/erpnext/crm/doctype/lead/lead.py @@ -114,10 +114,12 @@ class Lead(SellingController): def set_lead_name(self): if not self.lead_name: # Check for leads being created through data import - if not self.company_name and not self.flags.ignore_mandatory: + if not self.company_name and not self.email_id and not self.flags.ignore_mandatory: frappe.throw(_("A Lead requires either a person's name or an organization's name")) - - self.lead_name = self.company_name + elif self.company_name: + self.lead_name = self.company_name + else: + self.lead_name = self.email_id.split("@")[0] def set_title(self): if self.organization_lead: From 6669f7457a86d57aebbdaafa1b67ab79f4369478 Mon Sep 17 00:00:00 2001 From: Anupam K Date: Wed, 8 Jul 2020 01:24:53 +0530 Subject: [PATCH 09/24] hr dashboard number card filter fix --- erpnext/hr/dashboard_fixtures.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/hr/dashboard_fixtures.py b/erpnext/hr/dashboard_fixtures.py index 6d8091be64..1e9b4f3c93 100644 --- a/erpnext/hr/dashboard_fixtures.py +++ b/erpnext/hr/dashboard_fixtures.py @@ -123,7 +123,7 @@ def get_number_cards(): number_cards.append( get_number_cards_doc("Employee", "New Joinees (Last year)", filters_json = json.dumps([ - ["Employee","date_of_joining","Previous","1 year"], + ["Employee","date_of_joining","Timespan","last year"], ["Employee","status","=","Active"] ]) ) @@ -131,7 +131,7 @@ def get_number_cards(): number_cards.append( get_number_cards_doc("Employee", "Employees Left (Last year)", filters_json = json.dumps([ - ["Employee", "relieving_date", "Previous", "1 year"], + ["Employee", "relieving_date", "Timespan", "last year"], ["Employee", "status", "=", "Left"] ]) ) @@ -139,7 +139,7 @@ def get_number_cards(): number_cards.append( get_number_cards_doc("Job Applicant", "Total Applicants (Last month)", filters_json = json.dumps([ - ["Job Applicant", "creation", "Previous", "1 month"] + ["Job Applicant", "creation", "Timespan", "last month"] ]) ) ) From 8c5c74ca065cbcb7a10793de1f4bbfd4114eddd1 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 8 Jul 2020 09:20:13 +0530 Subject: [PATCH 10/24] fix: Remove trailing spaces from labels --- erpnext/stock/doctype/item_price/item_price.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/item_price/item_price.json b/erpnext/stock/doctype/item_price/item_price.json index 2e0ddfdaef..5f62381f8b 100644 --- a/erpnext/stock/doctype/item_price/item_price.json +++ b/erpnext/stock/doctype/item_price/item_price.json @@ -172,7 +172,7 @@ "default": "Today", "fieldname": "valid_from", "fieldtype": "Date", - "label": "Valid From " + "label": "Valid From" }, { "default": "0", @@ -187,7 +187,7 @@ { "fieldname": "valid_upto", "fieldtype": "Date", - "label": "Valid Upto " + "label": "Valid Upto" }, { "fieldname": "section_break_24", @@ -208,7 +208,7 @@ "icon": "fa fa-flag", "idx": 1, "links": [], - "modified": "2020-02-28 14:21:25.580331", + "modified": "2020-07-06 22:31:32.943475", "modified_by": "Administrator", "module": "Stock", "name": "Item Price", From e862b3f9ce523422c986642111614f1059b20932 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 8 Jul 2020 12:34:15 +0530 Subject: [PATCH 11/24] Update payroll_entry.js --- erpnext/payroll/doctype/payroll_entry/payroll_entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/payroll/doctype/payroll_entry/payroll_entry.js b/erpnext/payroll/doctype/payroll_entry/payroll_entry.js index 0415ebf2fc..8d35a7be47 100644 --- a/erpnext/payroll/doctype/payroll_entry/payroll_entry.js +++ b/erpnext/payroll/doctype/payroll_entry/payroll_entry.js @@ -51,7 +51,7 @@ frappe.ui.form.on('Payroll Entry', { doc: frm.doc, method: 'fill_employee_details', }).then(r => { - if (r.docs[0].employees){ + if (r.docs && r.docs[0].employees){ frm.employees = r.docs[0].employees; frm.dirty(); frm.save(); From 1fce8b7475b827c099656ef8447d65dd4b157b98 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 8 Jul 2020 12:40:01 +0530 Subject: [PATCH 12/24] Update leave_application.js --- erpnext/hr/doctype/leave_application/leave_application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js index 9413120bc5..4001a45507 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.js +++ b/erpnext/hr/doctype/leave_application/leave_application.js @@ -41,7 +41,7 @@ frappe.ui.form.on("Leave Application", { if (frm.doc.from_date == frm.doc.to_date && frm.doc.half_day == 1){ frm.doc.half_day_date = frm.doc.from_date; }else if (frm.doc.half_day == 0){ - frm.doc.half_day_date = undefined; + frm.doc.half_day_date = ""; } frm.toggle_reqd("half_day_date", frm.doc.half_day == 1); }, From 5d514fe4df89575b4d4111be9d55d216293eafdc Mon Sep 17 00:00:00 2001 From: Michelle Alva <50285544+michellealva@users.noreply.github.com> Date: Wed, 8 Jul 2020 14:25:51 +0530 Subject: [PATCH 13/24] fix: grammatical fixes in module onboarding (#22580) * fix: grammatical fixes in module onboarding * fix: more grammatical changes for consistency * fix: Reorder Stock Onboarding * fix: update success message * fix: change order of stock onboarding steps Co-authored-by: Marica --- .../module_onboarding/accounts/accounts.json | 9 +++-- .../create_a_customer/create_a_customer.json | 2 +- .../create_a_product/create_a_product.json | 4 +-- .../module_onboarding/assets/assets.json | 11 +++---- .../create_a_fixed_asset_item.json | 5 ++- .../create_an_asset/create_an_asset.json | 5 ++- .../create_an_asset_category.json | 33 ++++++++++--------- .../introduction_to_assets.json | 3 ++ .../purchase_an_asset_item.json | 5 ++- .../module_onboarding/buying/buying.json | 7 ++-- .../buying_settings/buying_settings.json | 10 +++--- .../setup_your_warehouse.json | 4 +-- erpnext/crm/module_onboarding/crm/crm.json | 9 +++-- .../healthcare/healthcare.json | 9 +++-- .../human_resource/human_resource.json | 9 +++-- .../manufacturing/manufacturing.json | 10 +++--- .../module_onboarding/payroll/payroll.json | 9 +++-- .../create_employee/create_employee.json | 2 +- .../create_payroll_period.json | 2 +- .../payroll_settings/payroll_settings.json | 10 +++--- .../module_onboarding/selling/selling.json | 7 ++-- .../setup_your_warehouse.json | 4 +-- .../stock/module_onboarding/stock/stock.json | 4 +-- .../create_a_supplier/create_a_supplier.json | 2 +- .../setup_your_warehouse.json | 4 +-- 25 files changed, 93 insertions(+), 86 deletions(-) diff --git a/erpnext/accounts/module_onboarding/accounts/accounts.json b/erpnext/accounts/module_onboarding/accounts/accounts.json index 12da440028..ba1a779b4c 100644 --- a/erpnext/accounts/module_onboarding/accounts/accounts.json +++ b/erpnext/accounts/module_onboarding/accounts/accounts.json @@ -13,7 +13,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/accounts", "idx": 0, "is_complete": 0, - "modified": "2020-05-14 22:11:06.475938", + "modified": "2020-07-08 14:06:09.033880", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts", @@ -44,8 +44,7 @@ "step": "Configure Account Settings" } ], - "subtitle": "Accounts, invoices and taxation.", - "success_message": "The Accounts module is now set up!", - "title": "Let's Setup Your Accounts and Taxes.", - "user_can_dismiss": 1 + "subtitle": "Accounts, Invoices, Taxation, and more.", + "success_message": "The Accounts Module is all set up!", + "title": "Let's Set Up Your Accounts and Taxes." } \ No newline at end of file diff --git a/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json b/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json index bb396d268a..5a403b06cf 100644 --- a/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json +++ b/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json @@ -8,7 +8,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-14 17:46:41.831517", + "modified": "2020-06-01 13:16:19.731719", "modified_by": "Administrator", "name": "Create a Customer", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json b/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json index 450bee1f40..d2068e167b 100644 --- a/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json +++ b/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json @@ -1,6 +1,6 @@ { "action": "Create Entry", - "creation": "2020-05-14 17:45:28.554605", + "creation": "2020-05-12 18:16:06.624554", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, @@ -8,7 +8,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-14 17:45:28.554605", + "modified": "2020-05-12 18:30:02.489949", "modified_by": "Administrator", "name": "Create a Product", "owner": "Administrator", diff --git a/erpnext/assets/module_onboarding/assets/assets.json b/erpnext/assets/module_onboarding/assets/assets.json index 66dd60ae81..1086ab4bcd 100644 --- a/erpnext/assets/module_onboarding/assets/assets.json +++ b/erpnext/assets/module_onboarding/assets/assets.json @@ -13,7 +13,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/asset", "idx": 0, "is_complete": 0, - "modified": "2020-05-08 16:17:31.685943", + "modified": "2020-07-08 14:05:51.828497", "modified_by": "Administrator", "module": "Assets", "name": "Assets", @@ -27,7 +27,7 @@ }, { "step": "Create an Asset Category" - }, + }, { "step": "Purchase an Asset Item" }, @@ -35,8 +35,7 @@ "step": "Create an Asset" } ], - "subtitle": "Assets, Depreciations, Repairs and more", - "success_message": "The Asset Module is all set up!", - "title": "Let's Setup Asset Management", - "user_can_dismiss": 1 + "subtitle": "Assets, Depreciations, Repairs, and more.", + "success_message": "The Assets Module is all set up!", + "title": "Let's Set Up the Assets Module." } \ No newline at end of file diff --git a/erpnext/assets/onboarding_step/create_a_fixed_asset_item/create_a_fixed_asset_item.json b/erpnext/assets/onboarding_step/create_a_fixed_asset_item/create_a_fixed_asset_item.json index f5818c091f..51702d9cb5 100644 --- a/erpnext/assets/onboarding_step/create_a_fixed_asset_item/create_a_fixed_asset_item.json +++ b/erpnext/assets/onboarding_step/create_a_fixed_asset_item/create_a_fixed_asset_item.json @@ -6,11 +6,14 @@ "idx": 0, "is_complete": 0, "is_mandatory": 0, + "is_single": 0, "is_skipped": 0, "modified": "2020-05-08 13:20:00.259985", "modified_by": "Administrator", "name": "Create a Fixed Asset Item", "owner": "Administrator", "reference_document": "Item", - "title": "Create a Fixed Asset Item" + "show_full_form": 0, + "title": "Create a Fixed Asset Item", + "validate_action": 0 } \ No newline at end of file diff --git a/erpnext/assets/onboarding_step/create_an_asset/create_an_asset.json b/erpnext/assets/onboarding_step/create_an_asset/create_an_asset.json index 5488b1d7b4..b4f8a05e37 100644 --- a/erpnext/assets/onboarding_step/create_an_asset/create_an_asset.json +++ b/erpnext/assets/onboarding_step/create_an_asset/create_an_asset.json @@ -6,11 +6,14 @@ "idx": 0, "is_complete": 0, "is_mandatory": 0, + "is_single": 0, "is_skipped": 0, "modified": "2020-05-08 13:21:53.332538", "modified_by": "Administrator", "name": "Create an Asset", "owner": "Administrator", "reference_document": "Asset", - "title": "Create an Asset" + "show_full_form": 0, + "title": "Create an Asset", + "validate_action": 0 } \ No newline at end of file diff --git a/erpnext/assets/onboarding_step/create_an_asset_category/create_an_asset_category.json b/erpnext/assets/onboarding_step/create_an_asset_category/create_an_asset_category.json index 3bf54af348..ffdb954b95 100644 --- a/erpnext/assets/onboarding_step/create_an_asset_category/create_an_asset_category.json +++ b/erpnext/assets/onboarding_step/create_an_asset_category/create_an_asset_category.json @@ -1,16 +1,19 @@ { - "action": "Create Entry", - "creation": "2020-05-08 13:21:53.332538", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 0, - "is_skipped": 0, - "modified": "2020-05-08 13:21:53.332538", - "modified_by": "Administrator", - "name": "Create an Asset Category", - "owner": "Administrator", - "reference_document": "Asset Category", - "title": "Create an Asset Category" - } \ No newline at end of file + "action": "Create Entry", + "creation": "2020-05-08 13:21:53.332538", + "docstatus": 0, + "doctype": "Onboarding Step", + "idx": 0, + "is_complete": 0, + "is_mandatory": 0, + "is_single": 0, + "is_skipped": 0, + "modified": "2020-05-08 13:21:53.332538", + "modified_by": "Administrator", + "name": "Create an Asset Category", + "owner": "Administrator", + "reference_document": "Asset Category", + "show_full_form": 0, + "title": "Create an Asset Category", + "validate_action": 0 +} \ No newline at end of file diff --git a/erpnext/assets/onboarding_step/introduction_to_assets/introduction_to_assets.json b/erpnext/assets/onboarding_step/introduction_to_assets/introduction_to_assets.json index d48dd1cd3d..d89da27197 100644 --- a/erpnext/assets/onboarding_step/introduction_to_assets/introduction_to_assets.json +++ b/erpnext/assets/onboarding_step/introduction_to_assets/introduction_to_assets.json @@ -6,11 +6,14 @@ "idx": 0, "is_complete": 0, "is_mandatory": 0, + "is_single": 0, "is_skipped": 0, "modified": "2020-05-08 16:06:16.625646", "modified_by": "Administrator", "name": "Introduction to Assets", "owner": "Administrator", + "show_full_form": 0, "title": "Introduction to Assets", + "validate_action": 0, "video_url": "https://www.youtube.com/watch?v=I-K8pLRmvSo" } \ No newline at end of file diff --git a/erpnext/assets/onboarding_step/purchase_an_asset_item/purchase_an_asset_item.json b/erpnext/assets/onboarding_step/purchase_an_asset_item/purchase_an_asset_item.json index 732ff7f733..ce3185ef44 100644 --- a/erpnext/assets/onboarding_step/purchase_an_asset_item/purchase_an_asset_item.json +++ b/erpnext/assets/onboarding_step/purchase_an_asset_item/purchase_an_asset_item.json @@ -6,11 +6,14 @@ "idx": 0, "is_complete": 0, "is_mandatory": 0, + "is_single": 0, "is_skipped": 0, "modified": "2020-05-08 13:21:28.208059", "modified_by": "Administrator", "name": "Purchase an Asset Item", "owner": "Administrator", "reference_document": "Purchase Receipt", - "title": "Purchase an Asset Item" + "show_full_form": 0, + "title": "Purchase an Asset Item", + "validate_action": 0 } \ No newline at end of file diff --git a/erpnext/buying/module_onboarding/buying/buying.json b/erpnext/buying/module_onboarding/buying/buying.json index 6e4bbc95a2..887f85b82d 100644 --- a/erpnext/buying/module_onboarding/buying/buying.json +++ b/erpnext/buying/module_onboarding/buying/buying.json @@ -19,7 +19,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/buying", "idx": 0, "is_complete": 0, - "modified": "2020-06-01 12:55:09.234944", + "modified": "2020-07-08 14:05:28.273641", "modified_by": "Administrator", "module": "Buying", "name": "Buying", @@ -47,8 +47,7 @@ "step": "Buying Settings" } ], - "subtitle": "Products, Purchases, Analysis and more.", + "subtitle": "Products, Purchases, Analysis, and more.", "success_message": "The Buying Module is all set up!", - "title": "Let's Set Up the Buying Module.", - "user_can_dismiss": 1 + "title": "Let's Set Up the Buying Module." } \ No newline at end of file diff --git a/erpnext/buying/onboarding_step/buying_settings/buying_settings.json b/erpnext/buying/onboarding_step/buying_settings/buying_settings.json index 6d765af137..a788ccd4cc 100644 --- a/erpnext/buying/onboarding_step/buying_settings/buying_settings.json +++ b/erpnext/buying/onboarding_step/buying_settings/buying_settings.json @@ -1,19 +1,19 @@ { - "action": "Show Form Tour", + "action": "Update Settings", "creation": "2020-05-06 15:53:44.667414", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, - "is_mandatory": 1, - "is_single": 1, + "is_mandatory": 0, + "is_single": 0, "is_skipped": 0, - "modified": "2020-06-01 12:52:57.668870", + "modified": "2020-05-12 18:30:06.323797", "modified_by": "Administrator", "name": "Buying Settings", "owner": "Administrator", "reference_document": "Buying Settings", "show_full_form": 0, "title": "Configure Buying Settings.", - "validate_action": 0 + "validate_action": 1 } \ No newline at end of file diff --git a/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json b/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json index 557c905bd6..9457deee26 100644 --- a/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json +++ b/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json @@ -8,13 +8,13 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-19 18:54:19.383397", + "modified": "2020-07-04 12:33:16.970031", "modified_by": "Administrator", "name": "Setup your Warehouse", "owner": "Administrator", "path": "Tree/Warehouse", "reference_document": "Warehouse", "show_full_form": 0, - "title": "Setup your Warehouse", + "title": "Set up your Warehouse", "validate_action": 1 } \ No newline at end of file diff --git a/erpnext/crm/module_onboarding/crm/crm.json b/erpnext/crm/module_onboarding/crm/crm.json index 44d672a7b5..8315218c84 100644 --- a/erpnext/crm/module_onboarding/crm/crm.json +++ b/erpnext/crm/module_onboarding/crm/crm.json @@ -16,7 +16,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/CRM", "idx": 0, "is_complete": 0, - "modified": "2020-05-28 21:07:41.278784", + "modified": "2020-07-08 14:05:42.644448", "modified_by": "Administrator", "module": "CRM", "name": "CRM", @@ -35,8 +35,7 @@ "step": "Create and Send Quotation" } ], - "subtitle": "Lead, Opportunity, Customer and more.", - "success_message": "CRM Module is all Set Up!", - "title": "Let's Set Up Your CRM.", - "user_can_dismiss": 1 + "subtitle": "Lead, Opportunity, Customer, and more.", + "success_message": "The CRM Module is all set up!", + "title": "Let's Set Up Your CRM." } \ No newline at end of file diff --git a/erpnext/healthcare/module_onboarding/healthcare/healthcare.json b/erpnext/healthcare/module_onboarding/healthcare/healthcare.json index 3e50726060..56c3c13559 100644 --- a/erpnext/healthcare/module_onboarding/healthcare/healthcare.json +++ b/erpnext/healthcare/module_onboarding/healthcare/healthcare.json @@ -10,7 +10,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/healthcare", "idx": 0, "is_complete": 0, - "modified": "2020-05-26 23:16:37.603361", + "modified": "2020-07-08 14:06:19.512946", "modified_by": "Administrator", "module": "Healthcare", "name": "Healthcare", @@ -35,8 +35,7 @@ "step": "Explore Clinical Procedure Templates" } ], - "subtitle": "Patients, Practitioner Schedules, Settings and more.", - "success_message": "Yayy! The Healthcare Module is all set up!", - "title": "Let's Setup the Healthcare Module", - "user_can_dismiss": 1 + "subtitle": "Patients, Practitioner Schedules, Settings, and more.", + "success_message": "The Healthcare Module is all set up!", + "title": "Let's Set Up the Healthcare Module." } \ No newline at end of file diff --git a/erpnext/hr/module_onboarding/human_resource/human_resource.json b/erpnext/hr/module_onboarding/human_resource/human_resource.json index e64582b407..518c002bca 100644 --- a/erpnext/hr/module_onboarding/human_resource/human_resource.json +++ b/erpnext/hr/module_onboarding/human_resource/human_resource.json @@ -13,7 +13,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/human-resources", "idx": 0, "is_complete": 0, - "modified": "2020-05-20 11:20:07.992597", + "modified": "2020-07-08 14:05:47.018799", "modified_by": "Administrator", "module": "HR", "name": "Human Resource", @@ -44,8 +44,7 @@ "step": "HR Settings" } ], - "subtitle": "Employee, Leaves and more.", - "success_message": "The HR Module is all set up!", - "title": "Let's Setup the Human Resource Module. ", - "user_can_dismiss": 0 + "subtitle": "Employee, Leaves, and more.", + "success_message": "The Human Resource Module is all set up!", + "title": "Let's Set Up the Human Resource Module. " } \ No newline at end of file diff --git a/erpnext/manufacturing/module_onboarding/manufacturing/manufacturing.json b/erpnext/manufacturing/module_onboarding/manufacturing/manufacturing.json index a36b63a1d9..7b5747e393 100644 --- a/erpnext/manufacturing/module_onboarding/manufacturing/manufacturing.json +++ b/erpnext/manufacturing/module_onboarding/manufacturing/manufacturing.json @@ -19,7 +19,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/manufacturing", "idx": 0, "is_complete": 0, - "modified": "2020-06-29 20:25:36.899106", + "modified": "2020-07-08 14:05:56.197563", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing", @@ -50,7 +50,7 @@ "step": "Explore Manufacturing Settings" } ], - "subtitle": "Products, Raw Materials, BOM, Work Order and more.", - "success_message": "Manufacturing module is all setup!", - "title": "Let's Set Up the Manufacturing Module" -} + "subtitle": "Products, Raw Materials, BOM, Work Order, and more.", + "success_message": "Manufacturing module is all set up!", + "title": "Let's Set Up the Manufacturing Module." +} \ No newline at end of file diff --git a/erpnext/payroll/module_onboarding/payroll/payroll.json b/erpnext/payroll/module_onboarding/payroll/payroll.json index 7ed786faee..b5226b2aca 100644 --- a/erpnext/payroll/module_onboarding/payroll/payroll.json +++ b/erpnext/payroll/module_onboarding/payroll/payroll.json @@ -13,7 +13,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/human-resources/payroll-entry", "idx": 0, "is_complete": 0, - "modified": "2020-06-29 17:00:25.113341", + "modified": "2020-07-08 14:06:13.994310", "modified_by": "Administrator", "module": "Payroll", "name": "Payroll", @@ -44,8 +44,7 @@ "step": "Payroll Settings" } ], - "subtitle": "Salary, Compensations and more.", - "success_message": "The Payroll is all set up!", - "title": "Let's Setup the Payroll Module. ", - "user_can_dismiss": 1 + "subtitle": "Salary, Compensation, and more.", + "success_message": "The Payroll Module is all set up!", + "title": "Let's Set Up the Payroll Module. " } \ No newline at end of file diff --git a/erpnext/payroll/onboarding_step/create_employee/create_employee.json b/erpnext/payroll/onboarding_step/create_employee/create_employee.json index 5839ae6ca4..3aa33c6d86 100644 --- a/erpnext/payroll/onboarding_step/create_employee/create_employee.json +++ b/erpnext/payroll/onboarding_step/create_employee/create_employee.json @@ -15,5 +15,5 @@ "reference_document": "Employee", "show_full_form": 0, "title": "Create Employee", - "validate_action": 1 + "validate_action": 0 } \ No newline at end of file diff --git a/erpnext/payroll/onboarding_step/create_payroll_period/create_payroll_period.json b/erpnext/payroll/onboarding_step/create_payroll_period/create_payroll_period.json index b1a7cc2734..4bae67546c 100644 --- a/erpnext/payroll/onboarding_step/create_payroll_period/create_payroll_period.json +++ b/erpnext/payroll/onboarding_step/create_payroll_period/create_payroll_period.json @@ -8,7 +8,7 @@ "is_mandatory": 1, "is_single": 0, "is_skipped": 0, - "modified": "2020-06-29 11:53:54.553947", + "modified": "2020-06-01 11:53:54.553947", "modified_by": "Administrator", "name": "Create Payroll Period", "owner": "Administrator", diff --git a/erpnext/payroll/onboarding_step/payroll_settings/payroll_settings.json b/erpnext/payroll/onboarding_step/payroll_settings/payroll_settings.json index a7cf7bf988..946b8c8707 100644 --- a/erpnext/payroll/onboarding_step/payroll_settings/payroll_settings.json +++ b/erpnext/payroll/onboarding_step/payroll_settings/payroll_settings.json @@ -1,19 +1,19 @@ { - "action": "Update Settings", + "action": "Go to Page", "creation": "2020-06-04 16:34:29.664917", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, "is_mandatory": 0, - "is_single": 1, + "is_single": 0, "is_skipped": 0, - "modified": "2020-06-29 16:34:29.664917", + "modified": "2020-06-04 16:34:29.664917", "modified_by": "Administrator", "name": "Payroll Settings", "owner": "Administrator", - "reference_document": "Payroll Settings", + "path": "#Form/Payroll Settings", "show_full_form": 0, "title": "Payroll Settings", - "validate_action": 0 + "validate_action": 1 } \ No newline at end of file diff --git a/erpnext/selling/module_onboarding/selling/selling.json b/erpnext/selling/module_onboarding/selling/selling.json index 10a33c9cf5..160208ff68 100644 --- a/erpnext/selling/module_onboarding/selling/selling.json +++ b/erpnext/selling/module_onboarding/selling/selling.json @@ -19,7 +19,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/selling", "idx": 0, "is_complete": 0, - "modified": "2020-06-01 13:35:16.100512", + "modified": "2020-07-08 14:05:37.669753", "modified_by": "Administrator", "module": "Selling", "name": "Selling", @@ -47,8 +47,7 @@ "step": "Selling Settings" } ], - "subtitle": "Products, Sales, Analysis and more.", + "subtitle": "Products, Sales, Analysis, and more.", "success_message": "The Selling Module is all set up!", - "title": "Let's Set Up the Selling Module.", - "user_can_dismiss": 1 + "title": "Let's Set Up the Selling Module." } \ No newline at end of file diff --git a/erpnext/selling/onboarding_step/setup_your_warehouse/setup_your_warehouse.json b/erpnext/selling/onboarding_step/setup_your_warehouse/setup_your_warehouse.json index 557c905bd6..9457deee26 100644 --- a/erpnext/selling/onboarding_step/setup_your_warehouse/setup_your_warehouse.json +++ b/erpnext/selling/onboarding_step/setup_your_warehouse/setup_your_warehouse.json @@ -8,13 +8,13 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-19 18:54:19.383397", + "modified": "2020-07-04 12:33:16.970031", "modified_by": "Administrator", "name": "Setup your Warehouse", "owner": "Administrator", "path": "Tree/Warehouse", "reference_document": "Warehouse", "show_full_form": 0, - "title": "Setup your Warehouse", + "title": "Set up your Warehouse", "validate_action": 1 } \ No newline at end of file diff --git a/erpnext/stock/module_onboarding/stock/stock.json b/erpnext/stock/module_onboarding/stock/stock.json index 10f05d4520..1d5bf8c97c 100644 --- a/erpnext/stock/module_onboarding/stock/stock.json +++ b/erpnext/stock/module_onboarding/stock/stock.json @@ -19,7 +19,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/stock", "idx": 0, "is_complete": 0, - "modified": "2020-06-29 16:41:09.440378", + "modified": "2020-07-08 14:22:07.951891", "modified_by": "Administrator", "module": "Stock", "name": "Stock", @@ -47,7 +47,7 @@ "step": "Stock Settings" } ], - "subtitle": "Inventory, Warehouses, Analysis and more.", + "subtitle": "Inventory, Warehouses, Analysis, and more.", "success_message": "The Stock Module is all set up!", "title": "Let's Set Up the Stock Module." } \ No newline at end of file diff --git a/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json b/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json index 4e753f4d84..7a64224bd4 100644 --- a/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json +++ b/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json @@ -8,7 +8,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-06-29 16:36:53.948242", + "modified": "2020-05-14 22:09:10.043554", "modified_by": "Administrator", "name": "Create a Supplier", "owner": "Administrator", diff --git a/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json b/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json index 557c905bd6..9457deee26 100644 --- a/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json +++ b/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json @@ -8,13 +8,13 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-19 18:54:19.383397", + "modified": "2020-07-04 12:33:16.970031", "modified_by": "Administrator", "name": "Setup your Warehouse", "owner": "Administrator", "path": "Tree/Warehouse", "reference_document": "Warehouse", "show_full_form": 0, - "title": "Setup your Warehouse", + "title": "Set up your Warehouse", "validate_action": 1 } \ No newline at end of file From e0ff0cfcb9f03fc09d40b2d640adfb21af8c1779 Mon Sep 17 00:00:00 2001 From: Afshan <33727827+AfshanKhan@users.noreply.github.com> Date: Wed, 8 Jul 2020 14:40:22 +0530 Subject: [PATCH 14/24] fix: fetch "Employee Leave Policy" from "Employee Grade" if available (#22570) * fix:fetch "Employee Leave Policy" from "Employee Grade" if available * fix: checked "Fetch IF Empty" checkbox Co-authored-by: Marica --- erpnext/hr/doctype/employee/employee.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/hr/doctype/employee/employee.json b/erpnext/hr/doctype/employee/employee.json index 7dacacf12b..f2afe065d1 100644 --- a/erpnext/hr/doctype/employee/employee.json +++ b/erpnext/hr/doctype/employee/employee.json @@ -410,6 +410,8 @@ "options": "Branch" }, { + "fetch_from": "grade.default_leave_policy", + "fetch_if_empty": 1, "fieldname": "leave_policy", "fieldtype": "Link", "label": "Leave Policy", @@ -804,16 +806,14 @@ "fieldname": "expense_approver", "fieldtype": "Link", "label": "Expense Approver", - "options": "User", - "show_days": 1, - "show_seconds": 1 + "options": "User" } ], "icon": "fa fa-user", "idx": 24, "image_field": "image", "links": [], - "modified": "2020-06-18 18:01:27.223535", + "modified": "2020-07-03 21:28:04.109189", "modified_by": "Administrator", "module": "HR", "name": "Employee", From 45b01d2c0242b95af45495362cecd9ccc814869b Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Wed, 8 Jul 2020 15:39:45 +0530 Subject: [PATCH 15/24] feat: add medical coding fields to Healthcare DocTypes (#22501) * feat: add medical coding fields to templates * feat: fetch medical codes from templates in forms * fix: codacy issues Co-authored-by: Marica --- .../clinical_procedure.json | 11 +- .../clinical_procedure_template.js | 10 + .../clinical_procedure_template.json | 25 ++- .../healthcare/doctype/lab_test/lab_test.json | 13 +- .../lab_test_template/lab_test_template.js | 11 +- .../lab_test_template/lab_test_template.json | 24 ++- .../doctype/medical_code/medical_code.json | 203 +++++------------- .../therapy_session/therapy_session.json | 11 +- .../doctype/therapy_type/therapy_type.js | 10 + .../doctype/therapy_type/therapy_type.json | 25 ++- 10 files changed, 189 insertions(+), 154 deletions(-) diff --git a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.json b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.json index eaf8d80ba8..b1d62da032 100644 --- a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.json +++ b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.json @@ -11,6 +11,7 @@ "title", "appointment", "procedure_template", + "medical_code", "column_break_30", "company", "invoiced", @@ -290,11 +291,19 @@ "no_copy": 1, "print_hide": 1, "read_only": 1 + }, + { + "fetch_from": "procedure_template.medical_code", + "fieldname": "medical_code", + "fieldtype": "Link", + "label": "Medical Code", + "options": "Medical Code", + "read_only": 1 } ], "is_submittable": 1, "links": [], - "modified": "2020-04-27 21:36:23.796924", + "modified": "2020-06-29 14:28:11.779815", "modified_by": "Administrator", "module": "Healthcare", "name": "Clinical Procedure", diff --git a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js index 16d4540c7c..1ef110dc6f 100644 --- a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js +++ b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js @@ -30,6 +30,16 @@ frappe.ui.form.on('Clinical Procedure Template', { mark_change_in_item(frm); }, + medical_code: function(frm) { + frm.set_query("medical_code", function() { + return { + filters: { + medical_code_standard: frm.doc.medical_code_standard + } + }; + }); + }, + refresh: function(frm) { frm.fields_dict['items'].grid.set_column_disp('barcode', false); frm.fields_dict['items'].grid.set_column_disp('batch_no', false); diff --git a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.json b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.json index 9cfd682f1d..17ac7eb1f9 100644 --- a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.json +++ b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.json @@ -21,6 +21,9 @@ "is_billable", "rate", "medical_department", + "medical_coding_section", + "medical_code_standard", + "medical_code", "consumables", "consume_stock", "items", @@ -46,7 +49,6 @@ "fieldname": "item_code", "fieldtype": "Data", "label": "Item Code", - "options": "Item", "read_only_depends_on": "eval: !doc.__islocal ", "reqd": 1 }, @@ -173,10 +175,29 @@ "no_copy": 1, "options": "Item", "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "medical_coding_section", + "fieldtype": "Section Break", + "label": "Medical Coding" + }, + { + "fieldname": "medical_code_standard", + "fieldtype": "Link", + "label": "Medical Code Standard", + "options": "Medical Code Standard" + }, + { + "depends_on": "medical_code_standard", + "fieldname": "medical_code", + "fieldtype": "Link", + "label": "Medical Code", + "options": "Medical Code" } ], "links": [], - "modified": "2020-02-28 14:16:13.184981", + "modified": "2020-06-29 14:12:27.158130", "modified_by": "Administrator", "module": "Healthcare", "name": "Clinical Procedure Template", diff --git a/erpnext/healthcare/doctype/lab_test/lab_test.json b/erpnext/healthcare/doctype/lab_test/lab_test.json index 17dc1edd8c..88eeb46a24 100644 --- a/erpnext/healthcare/doctype/lab_test/lab_test.json +++ b/erpnext/healthcare/doctype/lab_test/lab_test.json @@ -33,9 +33,10 @@ "user", "invoiced", "sb_first", + "template", "lab_test_name", "column_break_26", - "template", + "medical_code", "lab_test_group", "sb_normal", "normal_test_items", @@ -424,11 +425,19 @@ "print_hide": 1, "read_only": 1, "report_hide": 1 + }, + { + "fetch_from": "template.medical_code", + "fieldname": "medical_code", + "fieldtype": "Link", + "label": "Medical Code", + "options": "Medical Code", + "read_only": 1 } ], "is_submittable": 1, "links": [], - "modified": "2020-04-04 19:16:29.131168", + "modified": "2020-06-29 14:24:26.509721", "modified_by": "Administrator", "module": "Healthcare", "name": "Lab Test", diff --git a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.js b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.js index 5c9bf49e60..c3eedbbdf1 100644 --- a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.js +++ b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.js @@ -8,7 +8,7 @@ frappe.ui.form.on("Lab Test Template",{ if (!frm.doc.lab_test_description) frm.set_value("lab_test_description", frm.doc.lab_test_name); }, - refresh : function(frm) { + refresh: function(frm) { // Restrict Special, Grouped type templates in Child TestGroups frm.set_query("lab_test_template", "lab_test_groups", function() { return { @@ -17,6 +17,15 @@ frappe.ui.form.on("Lab Test Template",{ } }; }); + }, + medical_code: function(frm) { + frm.set_query("medical_code", function() { + return { + filters: { + medical_code_standard: frm.doc.medical_code_standard + } + }; + }); } }); diff --git a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json index a606bc4b1d..ebd2ec0246 100644 --- a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json +++ b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json @@ -19,6 +19,9 @@ "disabled", "is_billable", "lab_test_rate", + "medical_coding_section", + "medical_code_standard", + "medical_code", "section_break_normal", "lab_test_uom", "lab_test_normal_range", @@ -237,10 +240,29 @@ "fieldtype": "Text", "ignore_xss_filter": 1, "label": "Collection Details" + }, + { + "collapsible": 1, + "fieldname": "medical_coding_section", + "fieldtype": "Section Break", + "label": "Medical Coding" + }, + { + "depends_on": "medical_code_standard", + "fieldname": "medical_code", + "fieldtype": "Link", + "label": "Medical Code", + "options": "Medical Code" + }, + { + "fieldname": "medical_code_standard", + "fieldtype": "Link", + "label": "Medical Code Standard", + "options": "Medical Code Standard" } ], "links": [], - "modified": "2020-03-25 16:53:01.740103", + "modified": "2020-06-29 14:07:20.772219", "modified_by": "Administrator", "module": "Healthcare", "name": "Lab Test Template", diff --git a/erpnext/healthcare/doctype/medical_code/medical_code.json b/erpnext/healthcare/doctype/medical_code/medical_code.json index a2e7247517..5d69830907 100644 --- a/erpnext/healthcare/doctype/medical_code/medical_code.json +++ b/erpnext/healthcare/doctype/medical_code/medical_code.json @@ -1,156 +1,69 @@ { - "allow_copy": 1, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 1, - "beta": 1, - "creation": "2017-06-21 13:02:56.122897", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", + "actions": [], + "allow_copy": 1, + "allow_import": 1, + "allow_rename": 1, + "beta": 1, + "creation": "2017-06-21 13:02:56.122897", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "medical_code_standard", + "code", + "description" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "medical_code_standard", - "fieldtype": "Link", - "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": "Medical Code Standard", - "length": 0, - "no_copy": 0, - "options": "Medical Code Standard", - "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 - }, + "fieldname": "medical_code_standard", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Medical Code Standard", + "options": "Medical Code Standard", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "code", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Code", - "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 - }, + "fieldname": "code", + "fieldtype": "Data", + "ignore_xss_filter": 1, + "in_list_view": 1, + "label": "Code", + "reqd": 1, + "unique": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "fieldname": "description", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "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 + "bold": 1, + "fieldname": "description", + "fieldtype": "Small Text", + "ignore_xss_filter": 1, + "in_list_view": 1, + "label": "Description" } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2017-10-04 17:08:11.053418", - "modified_by": "Administrator", - "module": "Healthcare", - "name": "Medical Code", - "name_case": "", - "owner": "Administrator", + ], + "links": [], + "modified": "2020-06-29 14:02:30.980032", + "modified_by": "Administrator", + "module": "Healthcare", + "name": "Medical Code", + "owner": "Administrator", "permissions": [ { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Physician", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Physician", + "share": 1, "write": 1 } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Healthcare", - "search_fields": "code, description", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "", - "track_changes": 1, - "track_seen": 0 + ], + "quick_entry": 1, + "restrict_to_domain": "Healthcare", + "search_fields": "code, description", + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/healthcare/doctype/therapy_session/therapy_session.json b/erpnext/healthcare/doctype/therapy_session/therapy_session.json index 00d74a0949..c75d9342ef 100644 --- a/erpnext/healthcare/doctype/therapy_session/therapy_session.json +++ b/erpnext/healthcare/doctype/therapy_session/therapy_session.json @@ -19,6 +19,7 @@ "practitioner", "department", "details_section", + "medical_code", "duration", "rate", "location", @@ -206,11 +207,19 @@ "fieldtype": "Data", "label": "Patient Name", "read_only": 1 + }, + { + "fetch_from": "therapy_type.medical_code", + "fieldname": "medical_code", + "fieldtype": "Link", + "label": "Medical Code", + "options": "Medical Code", + "read_only": 1 } ], "is_submittable": 1, "links": [], - "modified": "2020-04-29 16:49:16.286006", + "modified": "2020-06-29 14:33:34.836594", "modified_by": "Administrator", "module": "Healthcare", "name": "Therapy Session", diff --git a/erpnext/healthcare/doctype/therapy_type/therapy_type.js b/erpnext/healthcare/doctype/therapy_type/therapy_type.js index 7a61b0def0..6e155dc21f 100644 --- a/erpnext/healthcare/doctype/therapy_type/therapy_type.js +++ b/erpnext/healthcare/doctype/therapy_type/therapy_type.js @@ -45,6 +45,16 @@ frappe.ui.form.on('Therapy Type', { medical_department: function(frm) { mark_change_in_item(frm); + }, + + medical_code: function(frm) { + frm.set_query("medical_code", function() { + return { + filters: { + medical_code_standard: frm.doc.medical_code_standard + } + }; + }); } }); diff --git a/erpnext/healthcare/doctype/therapy_type/therapy_type.json b/erpnext/healthcare/doctype/therapy_type/therapy_type.json index 0b3c3caeaa..f365b1df03 100644 --- a/erpnext/healthcare/doctype/therapy_type/therapy_type.json +++ b/erpnext/healthcare/doctype/therapy_type/therapy_type.json @@ -22,6 +22,9 @@ "item_group", "column_break_12", "description", + "medical_coding_section", + "medical_code_standard", + "medical_code", "section_break_18", "therapy_for", "add_exercises", @@ -160,10 +163,30 @@ { "fieldname": "section_break_18", "fieldtype": "Section Break" + }, + { + "collapsible": 1, + "fieldname": "medical_coding_section", + "fieldtype": "Section Break", + "label": "Medical Coding", + "options": "Medical Coding" + }, + { + "fieldname": "medical_code_standard", + "fieldtype": "Link", + "label": "Medical Code Standard", + "options": "Medical Code Standard" + }, + { + "depends_on": "medical_code_standard", + "fieldname": "medical_code", + "fieldtype": "Link", + "label": "Medical Code", + "options": "Medical Code" } ], "links": [], - "modified": "2020-04-21 13:09:04.006289", + "modified": "2020-06-29 14:18:50.669951", "modified_by": "Administrator", "module": "Healthcare", "name": "Therapy Type", From 6c6c36e7805efe461d15158d03a16db6c79c6b37 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Thu, 9 Jul 2020 11:23:41 +0530 Subject: [PATCH 16/24] fix: attribute error while cancelling patient encounter --- .../healthcare/doctype/patient_encounter/patient_encounter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py b/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py index 56401a3e74..262fc4650a 100644 --- a/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py +++ b/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py @@ -73,7 +73,7 @@ def update_encounter_medical_record(encounter): insert_encounter_to_medical_record(encounter) def delete_medical_record(encounter): - frappe.db.delete_doc_if_exists('Patient Medical Record', 'reference_name', encounter.name) + frappe.delete_doc_if_exists('Patient Medical Record', 'reference_name', encounter.name) def set_subject_field(encounter): subject = frappe.bold(_('Healthcare Practitioner: ')) + encounter.practitioner + '
' From cdf55cef80ddaf170159237d1d558e1949e0c8f8 Mon Sep 17 00:00:00 2001 From: Rohan Date: Thu, 9 Jul 2020 11:36:01 +0530 Subject: [PATCH 17/24] fix: fetch project-related info in Timesheet (#22423) Co-authored-by: Marica --- erpnext/projects/doctype/task/task.js | 69 +++++++++---------------- erpnext/projects/doctype/task/task.json | 1 + erpnext/projects/doctype/task/task.py | 25 ++++++++- 3 files changed, 47 insertions(+), 48 deletions(-) diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js index 5719276669..a044e1dca8 100644 --- a/erpnext/projects/doctype/task/task.js +++ b/erpnext/projects/doctype/task/task.js @@ -3,55 +3,36 @@ 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 = { + setup: function (frm) { + frm.set_query("project", function () { + return { + query: "erpnext.projects.doctype.task.task.get_project" + } + }); + + frm.make_methods = { + 'Timesheet': () => frappe.model.open_mapped_doc({ + method: 'erpnext.projects.doctype.task.task.make_timesheet', + frm: frm + }) + } + }, + + onload: function (frm) { + frm.set_query("task", "depends_on", function () { + let filters = { name: ["!=", frm.doc.name] }; - if(frm.doc.project) filters["project"] = frm.doc.project; + if (frm.doc.project) filters["project"] = frm.doc.project; return { filters: filters }; }) }, - refresh: function(frm) { - frm.fields_dict['parent_task'].get_query = function () { - return { - filters: { - "is_group": 1, - } - } - } - - if (!frm.doc.is_group) { - if (!frm.is_new()) { - if (frappe.model.can_read("Timesheet")) { - frm.add_custom_button(__("Timesheet"), () => { - frappe.route_options = { "project": frm.doc.project, "task": frm.doc.name } - frappe.set_route("List", "Timesheet"); - }, __("View"), true); - } - - if (frappe.model.can_read("Expense Claim")) { - frm.add_custom_button(__("Expense Claims"), () => { - frappe.route_options = { "project": frm.doc.project, "task": frm.doc.name }; - frappe.set_route("List", "Expense Claim"); - }, __("View"), true); - } - } - } - }, - - setup: function(frm) { - frm.fields_dict.project.get_query = function() { - return { - query: "erpnext.projects.doctype.task.task.get_project" - } - }; + refresh: function (frm) { + frm.set_query("parent_task", { "is_group": 1 }); }, is_group: function (frm) { @@ -69,12 +50,8 @@ frappe.ui.form.on("Task", { }) }, - validate: function(frm) { + validate: function (frm) { frm.doc.project && frappe.model.remove_from_locals("Project", frm.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 4db1f193ce..27f1a71a52 100644 --- a/erpnext/projects/doctype/task/task.json +++ b/erpnext/projects/doctype/task/task.json @@ -325,6 +325,7 @@ "options": "Department" }, { + "fetch_from": "project.company", "fieldname": "company", "fieldtype": "Link", "label": "Company", diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index 845cdba8bf..3b75cf4215 100755 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -7,10 +7,11 @@ import json import frappe from frappe import _, throw +from frappe.desk.form.assign_to import clear, close_all_assignments +from frappe.model.mapper import get_mapped_doc from frappe.utils import add_days, cstr, date_diff, get_link_to_form, getdate, today from frappe.utils.nestedset import NestedSet -from frappe.desk.form.assign_to import close_all_assignments, clear -from frappe.utils import date_diff + class CircularReferenceError(frappe.ValidationError): pass class EndDateCannotBeGreaterThanProjectEndDateError(frappe.ValidationError): pass @@ -220,6 +221,26 @@ def set_tasks_as_overdue(): continue frappe.get_doc("Task", task.name).update_status() + +@frappe.whitelist() +def make_timesheet(source_name, target_doc=None, ignore_permissions=False): + def set_missing_values(source, target): + target.append("time_logs", { + "hours": source.actual_time, + "completed": source.status == "Completed", + "project": source.project, + "task": source.name + }) + + doclist = get_mapped_doc("Task", source_name, { + "Task": { + "doctype": "Timesheet" + } + }, target_doc, postprocess=set_missing_values, ignore_permissions=ignore_permissions) + + return doclist + + @frappe.whitelist() def get_children(doctype, parent, task=None, project=None, is_root=False): From d7563f03274564d3907164df193de9e3df004cdf Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Thu, 9 Jul 2020 19:40:18 +0530 Subject: [PATCH 18/24] fix: default overwroite property n 'company' is not defined --- .../payroll/doctype/employee_incentive/employee_incentive.py | 1 + erpnext/payroll/doctype/retention_bonus/retention_bonus.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/payroll/doctype/employee_incentive/employee_incentive.py b/erpnext/payroll/doctype/employee_incentive/employee_incentive.py index 44763fc077..84a97f6bb2 100644 --- a/erpnext/payroll/doctype/employee_incentive/employee_incentive.py +++ b/erpnext/payroll/doctype/employee_incentive/employee_incentive.py @@ -13,6 +13,7 @@ class EmployeeIncentive(Document): additional_salary = frappe.new_doc('Additional Salary') additional_salary.employee = self.employee additional_salary.salary_component = self.salary_component + additional_salary.overwrite_salary_structure_amount = 0 additional_salary.amount = self.incentive_amount additional_salary.payroll_date = self.payroll_date additional_salary.company = company diff --git a/erpnext/payroll/doctype/retention_bonus/retention_bonus.py b/erpnext/payroll/doctype/retention_bonus/retention_bonus.py index ed0d36cfa5..b8e56ae42a 100644 --- a/erpnext/payroll/doctype/retention_bonus/retention_bonus.py +++ b/erpnext/payroll/doctype/retention_bonus/retention_bonus.py @@ -26,6 +26,7 @@ class RetentionBonus(Document): additional_salary.amount = self.bonus_amount additional_salary.payroll_date = self.bonus_payment_date additional_salary.company = company + additional_salary.overwrite_salary_structure_amount = 0 additional_salary.ref_doctype = self.doctype additional_salary.ref_docname = self.name additional_salary.submit() @@ -53,7 +54,7 @@ class RetentionBonus(Document): 'employee': self.employee, 'salary_component': self.salary_component, 'payroll_date': self.bonus_payment_date, - 'company': company, + 'company': self.company, 'docstatus': 1, 'ref_doctype': self.doctype, 'ref_docname': self.name From 1ec2d962dbcc7ccee30e0d0a35727aa890910203 Mon Sep 17 00:00:00 2001 From: Marica Date: Thu, 9 Jul 2020 20:02:18 +0530 Subject: [PATCH 19/24] fix: Remove rename related code from Serial No (#22627) --- erpnext/stock/doctype/serial_no/serial_no.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index f3514c7385..90f0f5881d 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -190,23 +190,6 @@ class SerialNo(StockController): if sle_exists: frappe.throw(_("Cannot delete Serial No {0}, as it is used in stock transactions").format(self.name)) - def before_rename(self, old, new, merge=False): - if merge: - frappe.throw(_("Sorry, Serial Nos cannot be merged")) - - def after_rename(self, old, new, merge=False): - """rename serial_no text fields""" - for dt in frappe.db.sql("""select parent from tabDocField - where fieldname='serial_no' and fieldtype in ('Text', 'Small Text')"""): - - for item in frappe.db.sql("""select name, serial_no from `tab%s` - where serial_no like %s""" % (dt[0], frappe.db.escape('%' + old + '%'))): - - serial_nos = map(lambda i: new if i.upper()==old.upper() else i, item[1].split('\n')) - frappe.db.sql("""update `tab%s` set serial_no = %s - where name=%s""" % (dt[0], '%s', '%s'), - ('\n'.join(list(serial_nos)), item[0])) - def update_serial_no_reference(self, serial_no=None): last_sle = self.get_last_sle(serial_no) self.set_purchase_details(last_sle.get("purchase_sle")) From d14666e41914b866c8d24306bcfcda0a9fe6911b Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 9 Jul 2020 20:07:10 +0530 Subject: [PATCH 20/24] fix: incorrect delivered qty in Supplier-Wise Sales Analytics (#22631) --- .../supplier_wise_sales_analytics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py index 6a86889aa3..5873a7a300 100644 --- a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py +++ b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py @@ -21,7 +21,7 @@ def execute(filters=None): for cd in consumed_details.get(item_code): if (cd.voucher_no not in material_transfer_vouchers): - if cd.voucher_type=="Delivery Note": + if cd.voucher_type in ["Delivery Note", "Sales Invoice"]: delivered_qty += abs(flt(cd.actual_qty)) delivered_amount += abs(flt(cd.stock_value_difference)) elif cd.voucher_type!="Delivery Note": From 3a3787f9e7594331e0285cd4485420d1ee7bb17f Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 9 Jul 2020 20:07:40 +0530 Subject: [PATCH 21/24] fix: Due to decimal issue make purchase receipt button not showing from PO (#22629) --- erpnext/buying/doctype/purchase_order/purchase_order.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 4a8146a797..84e3a31904 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -123,14 +123,14 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( } if(doc.status != "Closed") { if (doc.status != "On Hold") { - if(flt(doc.per_received, 2) < 100 && allow_receipt) { + if(flt(doc.per_received) < 100 && allow_receipt) { cur_frm.add_custom_button(__('Receipt'), this.make_purchase_receipt, __('Create')); if(doc.is_subcontracted==="Yes" && me.has_unsupplied_items()) { cur_frm.add_custom_button(__('Material to Supplier'), function() { me.make_stock_entry(); }, __("Transfer")); } } - if(flt(doc.per_billed, 2) < 100) + if(flt(doc.per_billed) < 100) cur_frm.add_custom_button(__('Invoice'), this.make_purchase_invoice, __('Create')); From fd28f1071ea0c9e5db50b87c38dc4575e07a6760 Mon Sep 17 00:00:00 2001 From: Afshan <33727827+AfshanKhan@users.noreply.github.com> Date: Fri, 10 Jul 2020 11:25:39 +0530 Subject: [PATCH 22/24] style: arrangements of filters for reports (#22636) --- .../accounts_payable/accounts_payable.js | 70 ++++++++-------- .../accounts_receivable.js | 82 +++++++++---------- 2 files changed, 76 insertions(+), 76 deletions(-) diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js index 2aa9618e55..6abd6e5cf7 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js @@ -17,41 +17,6 @@ frappe.query_reports["Accounts Payable"] = { "fieldtype": "Date", "default": frappe.datetime.get_today() }, - { - "fieldname":"ageing_based_on", - "label": __("Ageing Based On"), - "fieldtype": "Select", - "options": 'Posting Date\nDue Date\nSupplier Invoice Date', - "default": "Due Date" - }, - { - "fieldname":"range1", - "label": __("Ageing Range 1"), - "fieldtype": "Int", - "default": "30", - "reqd": 1 - }, - { - "fieldname":"range2", - "label": __("Ageing Range 2"), - "fieldtype": "Int", - "default": "60", - "reqd": 1 - }, - { - "fieldname":"range3", - "label": __("Ageing Range 3"), - "fieldtype": "Int", - "default": "90", - "reqd": 1 - }, - { - "fieldname":"range4", - "label": __("Ageing Range 4"), - "fieldtype": "Int", - "default": "120", - "reqd": 1 - }, { "fieldname":"finance_book", "label": __("Finance Book"), @@ -88,6 +53,41 @@ frappe.query_reports["Accounts Payable"] = { } } }, + { + "fieldname":"ageing_based_on", + "label": __("Ageing Based On"), + "fieldtype": "Select", + "options": 'Posting Date\nDue Date\nSupplier Invoice Date', + "default": "Due Date" + }, + { + "fieldname":"range1", + "label": __("Ageing Range 1"), + "fieldtype": "Int", + "default": "30", + "reqd": 1 + }, + { + "fieldname":"range2", + "label": __("Ageing Range 2"), + "fieldtype": "Int", + "default": "60", + "reqd": 1 + }, + { + "fieldname":"range3", + "label": __("Ageing Range 3"), + "fieldtype": "Int", + "default": "90", + "reqd": 1 + }, + { + "fieldname":"range4", + "label": __("Ageing Range 4"), + "fieldtype": "Int", + "default": "120", + "reqd": 1 + }, { "fieldname":"payment_terms_template", "label": __("Payment Terms Template"), diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js index 8dc558a611..c999eb9b8e 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js @@ -17,41 +17,6 @@ frappe.query_reports["Accounts Receivable"] = { "fieldtype": "Date", "default": frappe.datetime.get_today() }, - { - "fieldname":"ageing_based_on", - "label": __("Ageing Based On"), - "fieldtype": "Select", - "options": 'Posting Date\nDue Date', - "default": "Due Date" - }, - { - "fieldname":"range1", - "label": __("Ageing Range 1"), - "fieldtype": "Int", - "default": "30", - "reqd": 1 - }, - { - "fieldname":"range2", - "label": __("Ageing Range 2"), - "fieldtype": "Int", - "default": "60", - "reqd": 1 - }, - { - "fieldname":"range3", - "label": __("Ageing Range 3"), - "fieldtype": "Int", - "default": "90", - "reqd": 1 - }, - { - "fieldname":"range4", - "label": __("Ageing Range 4"), - "fieldtype": "Int", - "default": "120", - "reqd": 1 - }, { "fieldname":"finance_book", "label": __("Finance Book"), @@ -101,6 +66,41 @@ frappe.query_reports["Accounts Receivable"] = { } } }, + { + "fieldname":"ageing_based_on", + "label": __("Ageing Based On"), + "fieldtype": "Select", + "options": 'Posting Date\nDue Date', + "default": "Due Date" + }, + { + "fieldname":"range1", + "label": __("Ageing Range 1"), + "fieldtype": "Int", + "default": "30", + "reqd": 1 + }, + { + "fieldname":"range2", + "label": __("Ageing Range 2"), + "fieldtype": "Int", + "default": "60", + "reqd": 1 + }, + { + "fieldname":"range3", + "label": __("Ageing Range 3"), + "fieldtype": "Int", + "default": "90", + "reqd": 1 + }, + { + "fieldname":"range4", + "label": __("Ageing Range 4"), + "fieldtype": "Int", + "default": "120", + "reqd": 1 + }, { "fieldname":"customer_group", "label": __("Customer Group"), @@ -113,12 +113,6 @@ frappe.query_reports["Accounts Receivable"] = { "fieldtype": "Link", "options": "Payment Terms Template" }, - { - "fieldname":"territory", - "label": __("Territory"), - "fieldtype": "Link", - "options": "Territory" - }, { "fieldname":"sales_partner", "label": __("Sales Partner"), @@ -131,6 +125,12 @@ frappe.query_reports["Accounts Receivable"] = { "fieldtype": "Link", "options": "Sales Person" }, + { + "fieldname":"territory", + "label": __("Territory"), + "fieldtype": "Link", + "options": "Territory" + }, { "fieldname": "group_by_party", "label": __("Group By Customer"), From eee12fbcb4ec7bb793f2d4516b8285eb86105a10 Mon Sep 17 00:00:00 2001 From: Marica Date: Fri, 10 Jul 2020 12:34:59 +0530 Subject: [PATCH 23/24] fix: Remove redundant variable declaration (#22641) --- erpnext/utilities/transaction_base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py index 5bf85d1c64..c8e3330908 100644 --- a/erpnext/utilities/transaction_base.py +++ b/erpnext/utilities/transaction_base.py @@ -121,7 +121,6 @@ class TransactionBase(StatusUpdater): def validate_rate_with_reference_doc(self, ref_details): buying_doctypes = ["Purchase Order", "Purchase Invoice", "Purchase Receipt"] - selling_doctypes = ["Sales Invoice", "Delivery Note"] if self.doctype in buying_doctypes: to_disable = "Maintain same rate throughout Purchase cycle" From 7cb195b304f4098aafc74e54b2e53d4753116bd1 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 10 Jul 2020 13:33:50 +0530 Subject: [PATCH 24/24] fix: Distributed cost center query --- erpnext/accounts/report/financial_statements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 533685d703..ee1d54a92e 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -405,12 +405,12 @@ def set_gl_entries_by_account( FROM `tabDistributed Cost Center` WHERE cost_center IN %(cost_center)s AND parent NOT IN %(cost_center)s - AND is_cancelled = 0 GROUP BY parent ) as DCC_allocation WHERE company=%(company)s {additional_conditions} AND posting_date <= %(to_date)s + AND is_cancelled = 0 AND cost_center = DCC_allocation.parent """.format(additional_conditions=additional_conditions.replace("and cost_center in %(cost_center)s ", ''))