Skip to content

Commit

Permalink
Merge pull request #42983 from ruthra-kumar/link_utility_rpt_to_bank_…
Browse files Browse the repository at this point in the history
…reconciliation_statement

refactor: link utility report with bank reconciliation statement
  • Loading branch information
ruthra-kumar authored Aug 29, 2024
2 parents 5d99f17 + 00eac65 commit 4500f22
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,20 @@ frappe.query_reports["Bank Reconciliation Statement"] = {
fieldtype: "Check",
},
],
formatter: function (value, row, column, data, default_formatter, filter) {
if (column.fieldname == "payment_entry" && value == "Cheques and Deposits incorrectly cleared") {
column.link_onclick =
"frappe.query_reports['Bank Reconciliation Statement'].open_utility_report()";
}
return default_formatter(value, row, column, data);
},
open_utility_report: function () {
frappe.route_options = {
company: frappe.query_report.get_filter_value("company"),
account: frappe.query_report.get_filter_value("account"),
report_date: frappe.query_report.get_filter_value("report_date"),
};
frappe.open_in_new_tab = true;
frappe.set_route("query-report", "Cheques and Deposits Incorrectly cleared");
},
};

0 comments on commit 4500f22

Please sign in to comment.