-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39166 from barredterra/remove-je-list-indicators
refactor(Journal Entry): remove unused/redundant list indicators
- Loading branch information
Showing
1 changed file
with
16 additions
and
10 deletions.
There are no files selected for viewing
26 changes: 16 additions & 10 deletions
26
erpnext/accounts/doctype/journal_entry/journal_entry_list.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}`, | ||
]; | ||
} | ||
} | ||
}, | ||
}; |