Skip to content

Commit

Permalink
refactor: Move PR link filters to client side
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdeali099 committed Nov 27, 2024
1 parent cabe7ea commit 2db2c8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 4 additions & 0 deletions erpnext/accounts/doctype/payment_entry/payment_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};
});
Expand Down
7 changes: 1 addition & 6 deletions erpnext/accounts/doctype/payment_request/payment_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down

0 comments on commit 2db2c8b

Please sign in to comment.