Skip to content

Commit

Permalink
fix: replace locals with get_doc in set_query
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdeali099 committed Aug 12, 2024
1 parent 2af7ed8 commit a5f0dfa
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions erpnext/accounts/doctype/payment_entry/payment_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,14 @@ frappe.ui.form.on("Payment Entry", {
});

frm.set_query("payment_request", "references", function (doc, cdt, cdn) {
const row = locals[cdt][cdn];
const filters = {
docstatus: 1,
status: ["!=", "Paid"],
reference_doctype: row.reference_doctype,
reference_name: row.reference_name,
};
const row = frappe.get_doc(cdt, cdn);
return {
filters: filters,
filters: {
docstatus: 1,
status: ["!=", "Paid"],
reference_doctype: row.reference_doctype,
reference_name: row.reference_name,
},
};
});

Expand Down

0 comments on commit a5f0dfa

Please sign in to comment.