From 9e9e415c5fe21f55437026436b75cbf215ee89f4 Mon Sep 17 00:00:00 2001 From: Palash Jhabak Date: Wed, 15 May 2019 11:37:31 +0530 Subject: [PATCH] fix: Cancelled Lab Tests shouldnt show in SI (#17616) Cancelled Lab Tests were also showing up in Get Items of SI fixes issue #17607 --- erpnext/healthcare/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/healthcare/utils.py b/erpnext/healthcare/utils.py index 0987eb5403b..6a226d9c6b2 100644 --- a/erpnext/healthcare/utils.py +++ b/erpnext/healthcare/utils.py @@ -82,7 +82,7 @@ def get_healthcare_services_to_invoice(patient): 'service': service_item, 'rate': practitioner_charge, 'income_account': income_account}) - lab_tests = frappe.get_list("Lab Test", {'patient': patient.name, 'invoiced': False}) + lab_tests = frappe.get_list("Lab Test", {'patient': patient.name, 'invoiced': False, 'docstatus': 1}) if lab_tests: for lab_test in lab_tests: lab_test_obj = frappe.get_doc("Lab Test", lab_test['name'])