refactor(Journal Entry): remove unused/redundant list indicators

This commit is contained in:
barredterra 2024-01-05 17:26:54 +01:00
parent 3fb7886418
commit 5d33bbaff0

View File

@ -1,12 +1,18 @@
frappe.listview_settings['Journal Entry'] = { frappe.listview_settings["Journal Entry"] = {
add_fields: ["voucher_type", "posting_date", "total_debit", "company", "user_remark"], add_fields: [
"voucher_type",
"posting_date",
"total_debit",
"company",
"user_remark",
],
get_indicator: function (doc) { get_indicator: function (doc) {
if(doc.docstatus==0) { if (doc.docstatus === 1) {
return [__("Draft", "red", "docstatus,=,0")] return [
} else if(doc.docstatus==2) { __(doc.voucher_type),
return [__("Cancelled", "grey", "docstatus,=,2")] "blue",
} else { `voucher_type,=,${doc.voucher_type}`,
return [__(doc.voucher_type), "blue", "voucher_type,=," + doc.voucher_type] ];
}
} }
},
}; };