mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-12 11:25:09 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user