From 8ed512f6c6e7cced1e48fb93ed71e9a08a46a8aa Mon Sep 17 00:00:00 2001 From: Nirmalrajaa K Date: Fri, 21 Feb 2025 14:57:16 +0530 Subject: [PATCH] fix: Batch Price gets updated only if it is a billed item (cherry picked from commit 9597b1a69e965638d68c7018fc564ba71e9d4246) # Conflicts: # erpnext/stock/get_item_details.py --- erpnext/stock/get_item_details.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 5c5fe5db276..1cc4cb750db 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,8 +1051,14 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) +<<<<<<< HEAD if item_price and item_price[0][2] == params.get("uom"): return item_price[0][1] +======= + + if item_price and item_price[0].uom == pctx.uom and params.get("is_free_item") == 0: + return item_price[0].price_list_rate +>>>>>>> 9597b1a69e (fix: Batch Price gets updated only if it is a billed item) return 0.0