fix: Cancelled Lab Tests shouldnt show in SI (#17616)

Cancelled Lab Tests were also showing up in Get Items of SI

fixes issue #17607
This commit is contained in:
Palash Jhabak
2019-05-15 11:37:31 +05:30
committed by Nabin Hait
parent 0692e5eb78
commit 9e9e415c5f

View File

@@ -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'])