fix: Mode of payment not fetcched in Item wise purchase register
diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
index 11f4e0d..127f313 100644
--- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
+++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
@@ -201,7 +201,8 @@
{
'label': _('Mode Of Payment'),
'fieldname': 'mode_of_payment',
- 'fieldtype': 'Data',
+ 'fieldtype': 'Link',
+ 'options': 'Mode of Payment',
'width': 120
},
{
@@ -309,6 +310,8 @@
if additional_query_columns:
additional_query_columns = ', ' + ', '.join(additional_query_columns)
+ else:
+ additional_query_columns = ''
return frappe.db.sql("""
select
@@ -320,7 +323,7 @@
`tabPurchase Invoice Item`.`purchase_receipt`, `tabPurchase Invoice Item`.`po_detail`,
`tabPurchase Invoice Item`.`expense_account`, `tabPurchase Invoice Item`.`stock_qty`,
`tabPurchase Invoice Item`.`stock_uom`, `tabPurchase Invoice Item`.`base_net_amount`,
- `tabPurchase Invoice`.supplier_name, `tabPurchase Invoice`.mode_of_payment {0}
+ `tabPurchase Invoice`.`supplier_name`, `tabPurchase Invoice`.`mode_of_payment` {0}
from `tabPurchase Invoice`, `tabPurchase Invoice Item`
where `tabPurchase Invoice`.name = `tabPurchase Invoice Item`.`parent` and
`tabPurchase Invoice`.docstatus = 1 %s
diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
index 786e04d..0c8957a 100644
--- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
+++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
@@ -373,6 +373,8 @@
if additional_query_columns:
additional_query_columns = ', ' + ', '.join(additional_query_columns)
+ else:
+ additional_query_columns = ''
return frappe.db.sql("""
select