mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 20:35:09 +00:00
fix(report): add options to multiselectlist fields
(cherry picked from commit 8785342fce)
# Conflicts:
# erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js
# erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js
This commit is contained in:
@@ -89,6 +89,7 @@ frappe.query_reports["Accounts Payable"] = {
|
|||||||
fieldname: "party",
|
fieldname: "party",
|
||||||
label: __("Party"),
|
label: __("Party"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "party_type",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
if (!frappe.query_report.filters) return;
|
if (!frappe.query_report.filters) return;
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ frappe.query_reports["Accounts Payable Summary"] = {
|
|||||||
fieldname: "party",
|
fieldname: "party",
|
||||||
label: __("Party"),
|
label: __("Party"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "party_type",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
if (!frappe.query_report.filters) return;
|
if (!frappe.query_report.filters) return;
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ frappe.query_reports["Accounts Receivable"] = {
|
|||||||
fieldname: "party",
|
fieldname: "party",
|
||||||
label: __("Party"),
|
label: __("Party"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "party_type",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
if (!frappe.query_report.filters) return;
|
if (!frappe.query_report.filters) return;
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ frappe.query_reports["Accounts Receivable Summary"] = {
|
|||||||
fieldname: "party",
|
fieldname: "party",
|
||||||
label: __("Party"),
|
label: __("Party"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "party_type",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
if (!frappe.query_report.filters) return;
|
if (!frappe.query_report.filters) return;
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ function get_filters() {
|
|||||||
fieldname: "budget_against_filter",
|
fieldname: "budget_against_filter",
|
||||||
label: __("Dimension Filter"),
|
label: __("Dimension Filter"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "budget_against",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
if (!frappe.query_report.filters) return;
|
if (!frappe.query_report.filters) return;
|
||||||
|
|
||||||
|
|||||||
@@ -92,5 +92,30 @@ frappe.query_reports["Customer Ledger Summary"] = {
|
|||||||
fieldtype: "Data",
|
fieldtype: "Data",
|
||||||
hidden: 1,
|
hidden: 1,
|
||||||
},
|
},
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
{
|
||||||
|
fieldname: "cost_center",
|
||||||
|
label: __("Cost Center"),
|
||||||
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Cost Center",
|
||||||
|
get_data: function (txt) {
|
||||||
|
return frappe.db.get_link_options("Cost Center", txt, {
|
||||||
|
company: frappe.query_report.get_filter_value("company"),
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldname: "project",
|
||||||
|
label: __("Project"),
|
||||||
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Project",
|
||||||
|
get_data: function (txt) {
|
||||||
|
return frappe.db.get_link_options("Project", txt, {
|
||||||
|
company: frappe.query_report.get_filter_value("company"),
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
>>>>>>> 8785342fce (fix(report): add options to multiselectlist fields)
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ frappe.query_reports["General Ledger"] = {
|
|||||||
fieldname: "party",
|
fieldname: "party",
|
||||||
label: __("Party"),
|
label: __("Party"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "party_type",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
if (!frappe.query_report.filters) return;
|
if (!frappe.query_report.filters) return;
|
||||||
|
|
||||||
@@ -151,6 +152,7 @@ frappe.query_reports["General Ledger"] = {
|
|||||||
fieldname: "cost_center",
|
fieldname: "cost_center",
|
||||||
label: __("Cost Center"),
|
label: __("Cost Center"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Cost Center",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
return frappe.db.get_link_options("Cost Center", txt, {
|
return frappe.db.get_link_options("Cost Center", txt, {
|
||||||
company: frappe.query_report.get_filter_value("company"),
|
company: frappe.query_report.get_filter_value("company"),
|
||||||
@@ -161,6 +163,7 @@ frappe.query_reports["General Ledger"] = {
|
|||||||
fieldname: "project",
|
fieldname: "project",
|
||||||
label: __("Project"),
|
label: __("Project"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Project",
|
||||||
get_data: function (txt) {
|
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"),
|
company: frappe.query_report.get_filter_value("company"),
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ frappe.query_reports["Gross Profit"] = {
|
|||||||
fieldname: "cost_center",
|
fieldname: "cost_center",
|
||||||
label: __("Cost Center"),
|
label: __("Cost Center"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Cost Center",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
return frappe.db.get_link_options("Cost Center", txt, {
|
return frappe.db.get_link_options("Cost Center", txt, {
|
||||||
company: frappe.query_report.get_filter_value("company"),
|
company: frappe.query_report.get_filter_value("company"),
|
||||||
@@ -77,6 +78,7 @@ frappe.query_reports["Gross Profit"] = {
|
|||||||
fieldname: "project",
|
fieldname: "project",
|
||||||
label: __("Project"),
|
label: __("Project"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Project",
|
||||||
get_data: function (txt) {
|
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"),
|
company: frappe.query_report.get_filter_value("company"),
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ function get_filters() {
|
|||||||
fieldname: "party",
|
fieldname: "party",
|
||||||
label: __("Party"),
|
label: __("Party"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "party_type",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
if (!frappe.query_report.filters) return;
|
if (!frappe.query_report.filters) return;
|
||||||
|
|
||||||
|
|||||||
@@ -74,5 +74,30 @@ frappe.query_reports["Supplier Ledger Summary"] = {
|
|||||||
fieldtype: "Data",
|
fieldtype: "Data",
|
||||||
hidden: 1,
|
hidden: 1,
|
||||||
},
|
},
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
{
|
||||||
|
fieldname: "cost_center",
|
||||||
|
label: __("Cost Center"),
|
||||||
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Cost Center",
|
||||||
|
get_data: function (txt) {
|
||||||
|
return frappe.db.get_link_options("Cost Center", txt, {
|
||||||
|
company: frappe.query_report.get_filter_value("company"),
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldname: "project",
|
||||||
|
label: __("Project"),
|
||||||
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Project",
|
||||||
|
get_data: function (txt) {
|
||||||
|
return frappe.db.get_link_options("Project", txt, {
|
||||||
|
company: frappe.query_report.get_filter_value("company"),
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
>>>>>>> 8785342fce (fix(report): add options to multiselectlist fields)
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ frappe.query_reports["Purchase Order Analysis"] = {
|
|||||||
label: __("Status"),
|
label: __("Status"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
width: "80",
|
width: "80",
|
||||||
|
options: ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed"],
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
let status = ["To Bill", "To Receive", "To Receive and Bill", "Completed"];
|
let status = ["To Bill", "To Receive", "To Receive and Bill", "Completed"];
|
||||||
let options = [];
|
let options = [];
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ frappe.query_reports["Supplier Quotation Comparison"] = {
|
|||||||
fieldname: "supplier",
|
fieldname: "supplier",
|
||||||
label: __("Supplier"),
|
label: __("Supplier"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Supplier",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
return frappe.db.get_link_options("Supplier", txt);
|
return frappe.db.get_link_options("Supplier", txt);
|
||||||
},
|
},
|
||||||
@@ -58,6 +59,7 @@ frappe.query_reports["Supplier Quotation Comparison"] = {
|
|||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
label: __("Supplier Quotation"),
|
label: __("Supplier Quotation"),
|
||||||
fieldname: "supplier_quotation",
|
fieldname: "supplier_quotation",
|
||||||
|
options: "Supplier Quotation",
|
||||||
default: "",
|
default: "",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
return frappe.db.get_link_options("Supplier Quotation", txt, { docstatus: ["<", 2] });
|
return frappe.db.get_link_options("Supplier Quotation", txt, { docstatus: ["<", 2] });
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ frappe.query_reports["Opportunity Summary by Sales Stage"] = {
|
|||||||
fieldname: "status",
|
fieldname: "status",
|
||||||
label: __("Status"),
|
label: __("Status"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: ["Open", "Converted", "Quotation", "Replied"],
|
||||||
get_data: function () {
|
get_data: function () {
|
||||||
return [
|
return [
|
||||||
{ value: "Open", description: "Status" },
|
{ value: "Open", description: "Status" },
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ frappe.query_reports["Job Card Summary"] = {
|
|||||||
label: __("Work Orders"),
|
label: __("Work Orders"),
|
||||||
fieldname: "work_order",
|
fieldname: "work_order",
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Work Order",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
return frappe.db.get_link_options("Work Order", txt);
|
return frappe.db.get_link_options("Work Order", txt);
|
||||||
},
|
},
|
||||||
@@ -64,6 +65,7 @@ frappe.query_reports["Job Card Summary"] = {
|
|||||||
label: __("Production Item"),
|
label: __("Production Item"),
|
||||||
fieldname: "production_item",
|
fieldname: "production_item",
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Item",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
return frappe.db.get_link_options("Item", txt);
|
return frappe.db.get_link_options("Item", txt);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ frappe.query_reports["Production Planning Report"] = {
|
|||||||
fieldname: "docnames",
|
fieldname: "docnames",
|
||||||
label: __("Document Name"),
|
label: __("Document Name"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
options: "Sales Order",
|
options: "based_on",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
if (!frappe.query_report.filters) return;
|
if (!frappe.query_report.filters) return;
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ frappe.query_reports["Work Order Summary"] = {
|
|||||||
label: __("Sales Orders"),
|
label: __("Sales Orders"),
|
||||||
fieldname: "sales_order",
|
fieldname: "sales_order",
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Sales Order",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
return frappe.db.get_link_options("Sales Order", txt);
|
return frappe.db.get_link_options("Sales Order", txt);
|
||||||
},
|
},
|
||||||
@@ -50,6 +51,7 @@ frappe.query_reports["Work Order Summary"] = {
|
|||||||
label: __("Production Item"),
|
label: __("Production Item"),
|
||||||
fieldname: "production_item",
|
fieldname: "production_item",
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Item",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
return frappe.db.get_link_options("Item", txt);
|
return frappe.db.get_link_options("Item", txt);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ function get_filters() {
|
|||||||
fieldname: "status",
|
fieldname: "status",
|
||||||
label: __("Status"),
|
label: __("Status"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: ["Overdue", "Unpaid", "Completed", "Partly Paid"],
|
||||||
width: 100,
|
width: 100,
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
let status = ["Overdue", "Unpaid", "Completed", "Partly Paid"];
|
let status = ["Overdue", "Unpaid", "Completed", "Partly Paid"];
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ frappe.query_reports["Sales Order Analysis"] = {
|
|||||||
fieldname: "status",
|
fieldname: "status",
|
||||||
label: __("Status"),
|
label: __("Status"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed"],
|
||||||
width: "80",
|
width: "80",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
let status = ["To Bill", "To Deliver", "To Deliver and Bill", "Completed"];
|
let status = ["To Bill", "To Deliver", "To Deliver and Bill", "Completed"];
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ frappe.query_reports["Item Shortage Report"] = {
|
|||||||
fieldname: "warehouse",
|
fieldname: "warehouse",
|
||||||
label: __("Warehouse"),
|
label: __("Warehouse"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "Warehouse",
|
||||||
width: "100",
|
width: "100",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
return frappe.db.get_link_options("Warehouse", txt);
|
return frappe.db.get_link_options("Warehouse", txt);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ frappe.query_reports["Serial and Batch Summary"] = {
|
|||||||
fieldname: "voucher_no",
|
fieldname: "voucher_no",
|
||||||
label: __("Voucher No"),
|
label: __("Voucher No"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
|
options: "voucher_type",
|
||||||
get_data: function (txt) {
|
get_data: function (txt) {
|
||||||
if (!frappe.query_report.filters) return;
|
if (!frappe.query_report.filters) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user