mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 06:22:12 +00:00
fix: add parenttype clause to invoice tax query in sales_register report
(cherry picked from commit e30ab141f4)
This commit is contained in:
committed by
Mergify
parent
218c51cdcf
commit
603d2cf77d
@@ -526,7 +526,8 @@ def get_invoice_tax_map(invoice_list, invoice_income_map, income_accounts, inclu
|
|||||||
tax_details = frappe.db.sql(
|
tax_details = frappe.db.sql(
|
||||||
"""select parent, account_head,
|
"""select parent, account_head,
|
||||||
sum(base_tax_amount_after_discount_amount) as tax_amount
|
sum(base_tax_amount_after_discount_amount) as tax_amount
|
||||||
from `tabSales Taxes and Charges` where parent in (%s) group by parent, account_head"""
|
from `tabSales Taxes and Charges` where parent in (%s) and parenttype = 'Sales Invoice'
|
||||||
|
group by parent, account_head"""
|
||||||
% ", ".join(["%s"] * len(invoice_list)),
|
% ", ".join(["%s"] * len(invoice_list)),
|
||||||
tuple(inv.name for inv in invoice_list),
|
tuple(inv.name for inv in invoice_list),
|
||||||
as_dict=1,
|
as_dict=1,
|
||||||
|
|||||||
Reference in New Issue
Block a user