From 5d33bbaff069e6cd576c3a61f1b6dc614fef43b6 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:26:54 +0100 Subject: [PATCH] refactor(Journal Entry): remove unused/redundant list indicators --- .../journal_entry/journal_entry_list.js | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry_list.js b/erpnext/accounts/doctype/journal_entry/journal_entry_list.js index 48d6115e3d..acd17cb4c7 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry_list.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry_list.js @@ -1,12 +1,18 @@ -frappe.listview_settings['Journal Entry'] = { - add_fields: ["voucher_type", "posting_date", "total_debit", "company", "user_remark"], - get_indicator: function(doc) { - if(doc.docstatus==0) { - return [__("Draft", "red", "docstatus,=,0")] - } else if(doc.docstatus==2) { - return [__("Cancelled", "grey", "docstatus,=,2")] - } else { - return [__(doc.voucher_type), "blue", "voucher_type,=," + doc.voucher_type] +frappe.listview_settings["Journal Entry"] = { + add_fields: [ + "voucher_type", + "posting_date", + "total_debit", + "company", + "user_remark", + ], + get_indicator: function (doc) { + if (doc.docstatus === 1) { + return [ + __(doc.voucher_type), + "blue", + `voucher_type,=,${doc.voucher_type}`, + ]; } - } + }, };