mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-20 23:35:11 +00:00
fix: resolve item tax template from item group in update items
This commit is contained in:
@@ -70,10 +70,10 @@ from erpnext.stock.doctype.item.item import get_uom_conv_factor
|
||||
from erpnext.stock.doctype.packed_item.packed_item import make_packing_list
|
||||
from erpnext.stock.get_item_details import (
|
||||
ItemDetailsCtx,
|
||||
_get_item_tax_template,
|
||||
get_conversion_factor,
|
||||
get_item_details,
|
||||
get_item_tax_map,
|
||||
get_item_tax_template,
|
||||
get_item_warehouse_,
|
||||
)
|
||||
from erpnext.utilities.regional import temporary_flag
|
||||
@@ -3668,7 +3668,16 @@ def set_child_tax_template_and_map(item, child_item, parent_doc):
|
||||
}
|
||||
)
|
||||
|
||||
child_item.item_tax_template = get_item_tax_template(ctx, item.taxes)
|
||||
item_tax_template = _get_item_tax_template(ctx, item.taxes)
|
||||
|
||||
if not item_tax_template:
|
||||
item_group = item.item_group
|
||||
while item_group and not item_tax_template:
|
||||
item_group_doc = frappe.get_cached_doc("Item Group", item_group)
|
||||
item_tax_template = _get_item_tax_template(ctx, item_group_doc.taxes)
|
||||
item_group = item_group_doc.parent_item_group
|
||||
|
||||
child_item.item_tax_template = item_tax_template
|
||||
child_item.item_tax_rate = get_item_tax_map(
|
||||
doc=parent_doc,
|
||||
tax_template=child_item.item_tax_template,
|
||||
|
||||
Reference in New Issue
Block a user