fix: project filtering based on company in P&L Report (#35943)

* fix: project filtering in P&L Report

(cherry picked from commit 904ca746a6)

* fix: show projects with no company value set

(cherry picked from commit ce252a0d45)

* fix: make company field mandatory in project doctype

(cherry picked from commit 84d4888f5f)

---------

Co-authored-by: Gursheen Anand <gursheen@frappe.io>
This commit is contained in:
mergify[bot]
2023-07-01 10:42:33 +05:30
committed by GitHub
parent 6f50ad685e
commit 8de1d8663f
2 changed files with 6 additions and 3 deletions

View File

@@ -14,8 +14,10 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
"label": __("Project"),
"fieldtype": "MultiSelectList",
get_data: function(txt) {
return frappe.db.get_link_options('Project', txt);
}
return frappe.db.get_link_options('Project', txt, {
company: frappe.query_report.get_filter_value("company")
});
},
},
{
"fieldname": "include_default_book_entries",

View File

@@ -289,7 +289,8 @@
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"remember_last_selected_value": 1
"remember_last_selected_value": 1,
"reqd": 1
},
{
"fieldname": "column_break_28",