Skip to content

Commit

Permalink
refactor: Move PR link filters to client side
Browse files Browse the repository at this point in the history
(cherry picked from commit 2db2c8b)
  • Loading branch information
Abdeali099 authored and mergify[bot] committed Nov 29, 2024
1 parent 9baaaca commit eb80984
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 @@ -165,6 +165,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 @@ -848,12 +848,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 eb80984

Please sign in to comment.