Merge pull request #46252 from frappe/mergify/bp/version-15-hotfix/pr-46070

fix: Batch Price gets updated only if it is a billed item (backport #46070)
This commit is contained in:
ruthra kumar
2025-03-04 15:49:25 +05:30
committed by GitHub

View File

@@ -1051,7 +1051,9 @@ 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)
if item_price and item_price[0][2] == params.get("uom"):
is_free_item = params.get("items", [{}])[0].get("is_free_item")
if item_price and item_price[0][2] == params.get("uom") and not is_free_item:
return item_price[0][1]
return 0.0