Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Define variables before access in patient appointment (backport #267) #278

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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