From 7eded60892f0cfd3eecb10e5ecf0f6ec5248e81c Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Thu, 9 Apr 2026 17:40:03 +0530 Subject: [PATCH] feat: show reconciled/unreconciled indicator in list view --- .../doctype/payment_entry/payment_entry_list.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry_list.js b/erpnext/accounts/doctype/payment_entry/payment_entry_list.js index 6974e58c78c..95be03d4f10 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry_list.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry_list.js @@ -1,4 +1,20 @@ frappe.listview_settings["Payment Entry"] = { + add_fields: ["unallocated_amount", "docstatus"], + get_indicator: function (doc) { + if (doc.docstatus === 2) { + return [__("Cancelled"), "red", "docstatus,=,2"]; + } + + if (doc.docstatus === 0) { + return [__("Draft"), "orange", "docstatus,=,0"]; + } + + if (flt(doc.unallocated_amount) > 0) { + return [__("Unreconciled"), "orange", "docstatus,=,1|unallocated_amount,>,0"]; + } + + return [__("Reconciled"), "green", "docstatus,=,1|unallocated_amount,=,0"]; + }, onload: function (listview) { if (listview.page.fields_dict.party_type) { listview.page.fields_dict.party_type.get_query = function () {