From e18542ef6ae90bc4db450fa1ca02cd1a720575d3 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 24 Nov 2021 06:07:58 +0530 Subject: [PATCH] fix: Fix Product Bundle price calculation when there are multiple Product Bundles (cherry picked from commit 0803f87660625086f6ea787f85c46f3587463302) --- erpnext/stock/doctype/packed_item/packed_item.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py index 3f73093d673..095457f04cd 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.py +++ b/erpnext/stock/doctype/packed_item/packed_item.py @@ -128,7 +128,8 @@ def update_product_bundle_price(doc, parent_items): else: update_parent_item_price(doc, parent_items[parent_items_index][0], bundle_price) - bundle_price = 0 + bundle_item_rate = bundle_item.rate if bundle_item.rate else 0 + bundle_price = bundle_item.qty * bundle_item_rate parent_items_index += 1 # for the last product bundle