diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
index 49847d5bc8a..bba001c9c0e 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
@@ -433,11 +433,12 @@ let check_and_set_availability = function(frm) {
slot_html += `
${__('Maximum Capacity:')} ${slot_info.service_unit_capacity} `;
}
- slot_html += '
';
+ slot_html += '
';
slot_html += slot_info.avail_slot.map(slot => {
appointment_count = 0;
disabled = false;
+ count_class = tool_tip = '';
start_str = slot.from_time;
slot_start_time = moment(slot.from_time, 'HH:mm:ss');
slot_end_time = moment(slot.to_time, 'HH:mm:ss');
@@ -486,10 +487,11 @@ let check_and_set_availability = function(frm) {
data-duration=${interval}
data-service-unit="${slot_info.service_unit || ''}"
style="margin: 0 10px 10px 0; width: auto;" ${disabled ? 'disabled="disabled"' : ""}
- data-toggle="tooltip" title="${tool_tip}">
- ${start_str.substring(0, start_str.length - 3)}
- ${count}
+ data-toggle="tooltip" title="${tool_tip || ''}">
+ ${start_str.substring(0, start_str.length - 3)}
+ ${slot_info.service_unit_capacity ? `
${count} ` : ''}
`;
+
}).join("");
if (slot_info.service_unit_capacity) {
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
index dcbcda09d81..6d4cf4a5add 100755
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
@@ -354,7 +354,7 @@ def get_available_slots(practitioner_doc, date):
validate_practitioner_schedules(schedule_entry, practitioner)
practitioner_schedule = frappe.get_doc('Practitioner Schedule', schedule_entry.schedule)
- if practitioner_schedule:
+ if practitioner_schedule and not practitioner_schedule.disabled:
available_slots = []
for time_slot in practitioner_schedule.time_slots:
if weekday == time_slot.day: