From 5903002039c2b71f45ca5cdbc80bbc86ac0ede8e Mon Sep 17 00:00:00 2001 From: anoop Date: Tue, 28 Jul 2020 21:15:54 +0530 Subject: [PATCH] fix: exclude Cancelled appointments while Get Items in Sales Invoice --- 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 9abaa0784a..dbd3b83f09 100644 --- a/erpnext/healthcare/utils.py +++ b/erpnext/healthcare/utils.py @@ -40,7 +40,7 @@ def get_appointments_to_invoice(patient, company): patient_appointments = frappe.get_list( 'Patient Appointment', fields = '*', - filters = {'patient': patient.name, 'company': company, 'invoiced': 0}, + filters = {'patient': patient.name, 'company': company, 'invoiced': 0, 'status': ['not in', 'Cancelled']}, order_by = 'appointment_date' )