fix: item_code filter in item-wise sales register
This commit is contained in:
@@ -54,6 +54,12 @@ frappe.query_reports["Item-wise Sales Register"] = {
|
||||
fieldtype: "Link",
|
||||
options: "Brand",
|
||||
},
|
||||
{
|
||||
fieldname: "item_code",
|
||||
label: __("Item"),
|
||||
fieldtype: "Link",
|
||||
options: "Item",
|
||||
},
|
||||
{
|
||||
fieldname: "item_group",
|
||||
label: __("Item Group"),
|
||||
|
||||
@@ -342,7 +342,7 @@ def get_columns(additional_table_columns, filters):
|
||||
|
||||
|
||||
def apply_conditions(query, si, sii, filters, additional_conditions=None):
|
||||
for opts in ("company", "customer", "item_code"):
|
||||
for opts in ("company", "customer"):
|
||||
if filters.get(opts):
|
||||
query = query.where(si[opts] == filters[opts])
|
||||
|
||||
@@ -371,6 +371,9 @@ def apply_conditions(query, si, sii, filters, additional_conditions=None):
|
||||
if filters.get("brand"):
|
||||
query = query.where(sii.brand == filters.get("brand"))
|
||||
|
||||
if filters.get("item_code"):
|
||||
query = query.where(sii.item_code == filters.get("item_code"))
|
||||
|
||||
if filters.get("item_group"):
|
||||
query = query.where(sii.item_group == filters.get("item_group"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user