fix: add not specified key for None respresented customer_group and territory

(cherry picked from commit 24cc711a70)

# Conflicts:
#	erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
This commit is contained in:
l0gesh29
2025-06-26 18:32:54 +05:30
committed by ruthra kumar
parent d60d8a2625
commit 8371dafb1a

View File

@@ -5,13 +5,14 @@
import frappe import frappe
from frappe import _ from frappe import _
from frappe.model.meta import get_field_precision from frappe.model.meta import get_field_precision
from frappe.query_builder import functions as fn
from frappe.utils import cstr, flt from frappe.utils import cstr, flt
from frappe.utils.nestedset import get_descendants_of from frappe.utils.nestedset import get_descendants_of
from frappe.utils.xlsxutils import handle_html from frappe.utils.xlsxutils import handle_html
from pypika import Order from pypika import Order
from erpnext.accounts.report.sales_register.sales_register import get_mode_of_payments from erpnext.accounts.report.sales_register.sales_register import get_mode_of_payments
from erpnext.accounts.report.utils import get_query_columns, get_values_for_columns from erpnext.accounts.report.utils import get_values_for_columns
from erpnext.selling.report.item_wise_sales_history.item_wise_sales_history import ( from erpnext.selling.report.item_wise_sales_history.item_wise_sales_history import (
get_customer_details, get_customer_details,
) )
@@ -433,7 +434,7 @@ def get_items(filters, additional_query_columns, additional_conditions=None):
si.is_internal_customer, si.is_internal_customer,
si.customer, si.customer,
si.remarks, si.remarks,
si.territory, fn.IfNull(si.territory, "Not Specified").as_("territory"),
si.company, si.company,
si.base_net_total, si.base_net_total,
sii.project, sii.project,
@@ -456,7 +457,7 @@ def get_items(filters, additional_query_columns, additional_conditions=None):
sii.base_net_rate, sii.base_net_rate,
sii.base_net_amount, sii.base_net_amount,
si.customer_name, si.customer_name,
si.customer_group, fn.IfNull(si.customer_group, "Not Specified").as_("customer_group"),
sii.so_detail, sii.so_detail,
si.update_stock, si.update_stock,
sii.uom, sii.uom,