[fix] Healthcare field and desktop icon (#15638)
* Test Inpatient Record - Fix
* Test Inpatient Record - Fix
* Healthcare - Patch rename_healthcare_doctype_and_fields - Updated
* Healthcare - Desktop Icons - Updated
* Healthcare - Patch change in healthcare desktop icons
* Healthcare Util - fix - appointments valid in fee validity
* Healthcare Settings - field label change
* Patient allow rename
* fix: remove unused variable
diff --git a/erpnext/healthcare/utils.py b/erpnext/healthcare/utils.py
index 58c38b1..0987eb5 100644
--- a/erpnext/healthcare/utils.py
+++ b/erpnext/healthcare/utils.py
@@ -342,6 +342,8 @@
def appointments_valid_in_fee_validity(appointment, invoiced):
valid_days = frappe.db.get_value("Healthcare Settings", None, "valid_days")
max_visit = frappe.db.get_value("Healthcare Settings", None, "max_visit")
+ if int(max_visit) < 1:
+ max_visit = 1
valid_days_date = add_days(getdate(appointment.appointment_date), int(valid_days))
return frappe.get_list("Patient Appointment",{'patient': appointment.patient, 'invoiced': invoiced,
'appointment_date':("<=", valid_days_date), 'appointment_date':(">=", getdate(appointment.appointment_date)),