Skip to content

Commit

Permalink
fix: Define variables before access in patient appointment
Browse files Browse the repository at this point in the history
  • Loading branch information
mujeerhashmi authored and akashkrishna619 committed Sep 15, 2023
1 parent 38f161b commit bc9de0a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -889,23 +889,23 @@ let make_payment = function (frm, automate_invoicing) {
];

if (frm.doc.appointment_for == "Practitioner") {
pract_dict = {
let pract_dict = {
label: "Practitioner",
fieldname: "practitioner",
fieldtype: "Data",
read_only: true,
};
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",
read_only: true,
};
fields.splice(1, 0, su_dict);
} else if (frm.doc.appointment_for == "Department") {
dept_dict = {
let dept_dict = {
label: "Department",
fieldname: "department",
fieldtype: "Data",
Expand Down

0 comments on commit bc9de0a

Please sign in to comment.