refactor: Move PR link filters to client side

This commit is contained in:
Abdeali Chharchhoda
2024-11-27 15:52:45 +05:30
parent cabe7ea028
commit 2db2c8bce1
2 changed files with 5 additions and 6 deletions

View File

@@ -185,6 +185,10 @@ frappe.ui.form.on("Payment Entry", {
filters: {
reference_doctype: row.reference_doctype,
reference_name: row.reference_name,
company: doc.company,
status: ["!=", "Paid"],
outstanding_amount: [">", 0], // for compatibility with old data
docstatus: 1,
},
};
});

View File

@@ -955,12 +955,7 @@ def get_open_payment_requests_query(doctype, txt, searchfield, start, page_len,
open_payment_requests = frappe.get_list(
"Payment Request",
filters={
**filters,
"status": ["!=", "Paid"],
"outstanding_amount": ["!=", 0], # for compatibility with old data
"docstatus": 1,
},
filters=filters,
fields=["name", "grand_total", "outstanding_amount"],
order_by="transaction_date ASC,creation ASC",
)