Merge pull request #38627 from frappe/mergify/bp/version-15-hotfix/pr-38623
fix: format only if searched text contain link value text (backport #38623)
This commit is contained in:
commit
5cf0c896bb
@ -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) + ")";
|
||||
|
Loading…
x
Reference in New Issue
Block a user