feat: modify accounting dimension as multiselect field

(cherry picked from commit 3fcd8d84ac)
This commit is contained in:
l0gesh29
2025-10-31 14:00:37 +05:30
committed by Mergify
parent eb2571492f
commit 6b6e017e36
5 changed files with 36 additions and 47 deletions

View File

@@ -26,16 +26,13 @@ frappe.query_reports["Accounts Payable"] = {
{ {
fieldname: "cost_center", fieldname: "cost_center",
label: __("Cost Center"), label: __("Cost Center"),
fieldtype: "Link", fieldtype: "MultiSelectList",
options: "Cost Center", get_data: function (txt) {
get_query: () => { return frappe.db.get_link_options("Cost Center", txt, {
var company = frappe.query_report.get_filter_value("company"); company: frappe.query_report.get_filter_value("company"),
return { });
filters: {
company: company,
},
};
}, },
options: "Cost Center",
}, },
{ {
fieldname: "party_account", fieldname: "party_account",

View File

@@ -45,16 +45,13 @@ frappe.query_reports["Accounts Payable Summary"] = {
{ {
fieldname: "cost_center", fieldname: "cost_center",
label: __("Cost Center"), label: __("Cost Center"),
fieldtype: "Link", fieldtype: "MultiSelectList",
options: "Cost Center", get_data: function (txt) {
get_query: () => { return frappe.db.get_link_options("Cost Center", txt, {
var company = frappe.query_report.get_filter_value("company"); company: frappe.query_report.get_filter_value("company"),
return { });
filters: {
company: company,
},
};
}, },
options: "Cost Center",
}, },
{ {
fieldname: "party_type", fieldname: "party_type",

View File

@@ -28,16 +28,13 @@ frappe.query_reports["Accounts Receivable"] = {
{ {
fieldname: "cost_center", fieldname: "cost_center",
label: __("Cost Center"), label: __("Cost Center"),
fieldtype: "Link", fieldtype: "MultiSelectList",
options: "Cost Center", get_data: function (txt) {
get_query: () => { return frappe.db.get_link_options("Cost Center", txt, {
var company = frappe.query_report.get_filter_value("company"); company: frappe.query_report.get_filter_value("company"),
return { });
filters: {
company: company,
},
};
}, },
options: "Cost Center",
}, },
{ {
fieldname: "party_type", fieldname: "party_type",

View File

@@ -45,16 +45,13 @@ frappe.query_reports["Accounts Receivable Summary"] = {
{ {
fieldname: "cost_center", fieldname: "cost_center",
label: __("Cost Center"), label: __("Cost Center"),
fieldtype: "Link", fieldtype: "MultiSelectList",
options: "Cost Center", get_data: function (txt) {
get_query: () => { return frappe.db.get_link_options("Cost Center", txt, {
var company = frappe.query_report.get_filter_value("company"); company: frappe.query_report.get_filter_value("company"),
return { });
filters: {
company: company,
},
};
}, },
options: "Cost Center",
}, },
{ {
fieldname: "party_type", fieldname: "party_type",

View File

@@ -47,22 +47,23 @@ frappe.query_reports["Trial Balance"] = {
{ {
fieldname: "cost_center", fieldname: "cost_center",
label: __("Cost Center"), label: __("Cost Center"),
fieldtype: "Link", fieldtype: "MultiSelectList",
options: "Cost Center", get_data: function (txt) {
get_query: function () { return frappe.db.get_link_options("Cost Center", txt, {
var company = frappe.query_report.get_filter_value("company"); company: frappe.query_report.get_filter_value("company"),
return { });
doctype: "Cost Center",
filters: {
company: company,
},
};
}, },
options: "Cost Center",
}, },
{ {
fieldname: "project", fieldname: "project",
label: __("Project"), label: __("Project"),
fieldtype: "Link", fieldtype: "MultiSelectList",
get_data: function (txt) {
return frappe.db.get_link_options("Project", txt, {
company: frappe.query_report.get_filter_value("company"),
});
},
options: "Project", options: "Project",
}, },
{ {