Skip to content

Commit

Permalink
feat: add project filter in reports importing financial statements js…
Browse files Browse the repository at this point in the history
… file (#36097)

feat: add project filter in reports importing financial statements js file (#36097)

feat: add project filter in financial statements js file
(cherry picked from commit 596a14e)

Co-authored-by: Gursheen Kaur Anand <40693548+GursheenK@users.noreply.github.com>
  • Loading branch information
mergify[bot] and GursheenK authored Jul 12, 2023
1 parent a3a052b commit 63e26e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
erpnext.financial_statements);

frappe.query_reports["Gross and Net Profit Report"]["filters"].push(
{
"fieldname": "project",
"label": __("Project"),
"fieldtype": "MultiSelectList",
get_data: function(txt) {
return frappe.db.get_link_options('Project', txt);
}
},
{
"fieldname": "accumulated_values",
"label": __("Accumulated Values"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
erpnext.utils.add_dimensions('Profit and Loss Statement', 10);

frappe.query_reports["Profit and Loss Statement"]["filters"].push(
{
"fieldname": "project",
"label": __("Project"),
"fieldtype": "MultiSelectList",
get_data: function(txt) {
return frappe.db.get_link_options('Project', txt, {
company: frappe.query_report.get_filter_value("company")
});
},
},
{
"fieldname": "include_default_book_entries",
"label": __("Include Default Book Entries"),
Expand Down
10 changes: 10 additions & 0 deletions erpnext/public/js/financial_statements.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,16 @@ function get_filters() {
company: frappe.query_report.get_filter_value("company")
});
}
},
{
"fieldname": "project",
"label": __("Project"),
"fieldtype": "MultiSelectList",
get_data: function(txt) {
return frappe.db.get_link_options('Project', txt, {
company: frappe.query_report.get_filter_value("company")
});
},
}
]

Expand Down

0 comments on commit 63e26e3

Please sign in to comment.