Skip to content

Commit

Permalink
fix: format only if searched text contain link value text
Browse files Browse the repository at this point in the history
(cherry picked from commit 08ed3cd)
  • Loading branch information
shariquerik authored and mergify[bot] committed Dec 7, 2023
1 parent 4e6b8ea commit b28deaa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion erpnext/public/js/financial_statements.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ frappe.provide("erpnext.financial_statements");

erpnext.financial_statements = {
"filters": get_filters(),
"formatter": function(value, row, column, data, default_formatter) {
"formatter": function(value, row, column, data, default_formatter, filter) {
if (data && column.fieldname=="account") {
value = data.account_name || value;

if (filter && filter?.text && filter?.type == "contains") {
if (!value.toLowerCase().includes(filter.text)) {
return value;
}
}

if (data.account) {
column.link_onclick =
"erpnext.financial_statements.open_general_ledger(" + JSON.stringify(data) + ")";
Expand Down

0 comments on commit b28deaa

Please sign in to comment.