From 922b714be97cc586110dd66a93ed8bc3c3d09ca3 Mon Sep 17 00:00:00 2001 From: Syed Mujeer Hashmi Date: Wed, 13 Sep 2023 22:23:12 +0530 Subject: [PATCH] fix: Define variables before access in patient appointment (cherry picked from commit bc9de0a477d9077959d433071163d2e48528ee1f) --- .../doctype/patient_appointment/patient_appointment.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/healthcare/healthcare/doctype/patient_appointment/patient_appointment.js b/healthcare/healthcare/doctype/patient_appointment/patient_appointment.js index fff52e4b15..4a9acd311b 100644 --- a/healthcare/healthcare/doctype/patient_appointment/patient_appointment.js +++ b/healthcare/healthcare/doctype/patient_appointment/patient_appointment.js @@ -120,7 +120,7 @@ frappe.ui.form.on('Patient Appointment', { // add button to invoice when show_payment_popup enabled if (!frm.is_new() && !frm.doc.invoiced && frm.doc.status != "Cancelled") { frappe.db.get_single_value("Healthcare Settings", "show_payment_popup").then(async val => { - fee_validity = (await frappe.call( + let fee_validity = (await frappe.call( "healthcare.healthcare.doctype.fee_validity.fee_validity.get_fee_validity", { "appointment_name": frm.doc.name, "date": frm.doc.appointment_date , "ignore_status": true })).message; @@ -889,7 +889,7 @@ let make_payment = function (frm, automate_invoicing) { ]; if (frm.doc.appointment_for == "Practitioner") { - pract_dict = { + let pract_dict = { label: "Practitioner", fieldname: "practitioner", fieldtype: "Data", @@ -897,7 +897,7 @@ let make_payment = function (frm, automate_invoicing) { }; fields.splice(1, 0, pract_dict); } else if (frm.doc.appointment_for == "Service Unit") { - su_dict = { + let su_dict = { label: "Service Unit", fieldname: "service_unit", fieldtype: "Data", @@ -905,7 +905,7 @@ let make_payment = function (frm, automate_invoicing) { }; fields.splice(1, 0, su_dict); } else if (frm.doc.appointment_for == "Department") { - dept_dict = { + let dept_dict = { label: "Department", fieldname: "department", fieldtype: "Data",