Skip to content

Commit

Permalink
Merge pull request #39166 from barredterra/remove-je-list-indicators
Browse files Browse the repository at this point in the history
refactor(Journal Entry): remove unused/redundant list indicators
  • Loading branch information
deepeshgarg007 authored Jan 13, 2024
2 parents 3b14c59 + e69f9dd commit ec5c0de
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions erpnext/accounts/doctype/journal_entry/journal_entry_list.js
Original file line number Diff line number Diff line change
@@ -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}`,
];
}
}
},
};

0 comments on commit ec5c0de

Please sign in to comment.