From dc7004e0833b711de87df0aa1db081406b8a0d5f Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 31 Jul 2018 16:01:02 +0530 Subject: [PATCH] [Fix] Patient Appointment Calendar not showing data properly (#15052) --- .../doctype/patient_appointment/patient_appointment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py index 4379986ddc..a25928b8e5 100755 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py @@ -292,10 +292,10 @@ def get_events(start, end, filters=None): conditions = get_event_conditions("Patient Appointment", filters) data = frappe.db.sql("""select name, patient, physician, status, duration, timestamp(appointment_date, appointment_time) as - 'start' from `tabPatient Appointment` where + 'appointment_date' from `tabPatient Appointment` where (appointment_date between %(start)s and %(end)s) and docstatus < 2 {conditions}""".format(conditions=conditions), {"start": start, "end": end}, as_dict=True, update={"allDay": 0}) for item in data: - item.end = item.start + datetime.timedelta(minutes = item.duration) + item.appointment_datetime = item.appointment_date + datetime.timedelta(minutes = item.duration) return data