refactor: Move PR link filters to client side
This commit is contained in:
@@ -185,6 +185,10 @@ frappe.ui.form.on("Payment Entry", {
|
|||||||
filters: {
|
filters: {
|
||||||
reference_doctype: row.reference_doctype,
|
reference_doctype: row.reference_doctype,
|
||||||
reference_name: row.reference_name,
|
reference_name: row.reference_name,
|
||||||
|
company: doc.company,
|
||||||
|
status: ["!=", "Paid"],
|
||||||
|
outstanding_amount: [">", 0], // for compatibility with old data
|
||||||
|
docstatus: 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -955,12 +955,7 @@ def get_open_payment_requests_query(doctype, txt, searchfield, start, page_len,
|
|||||||
|
|
||||||
open_payment_requests = frappe.get_list(
|
open_payment_requests = frappe.get_list(
|
||||||
"Payment Request",
|
"Payment Request",
|
||||||
filters={
|
filters=filters,
|
||||||
**filters,
|
|
||||||
"status": ["!=", "Paid"],
|
|
||||||
"outstanding_amount": ["!=", 0], # for compatibility with old data
|
|
||||||
"docstatus": 1,
|
|
||||||
},
|
|
||||||
fields=["name", "grand_total", "outstanding_amount"],
|
fields=["name", "grand_total", "outstanding_amount"],
|
||||||
order_by="transaction_date ASC,creation ASC",
|
order_by="transaction_date ASC,creation ASC",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user