fix: Batch Price gets updated only if it is a billed item

This commit is contained in:
Nirmalrajaa K
2025-02-22 22:04:00 +05:30
committed by ruthra kumar
parent 9597b1a69e
commit 1a56b83054

View File

@@ -1095,8 +1095,9 @@ def get_batch_based_item_price(pctx: ItemPriceCtx | dict | str, item_code) -> fl
if not item_price:
item_price = get_item_price(pctx, item_code, ignore_party=True, force_batch_no=True)
is_free_item = pctx.get('items', [{}])[0].get('is_free_item')
if item_price and item_price[0].uom == pctx.uom and params.get("is_free_item") == 0:
if item_price and item_price[0].uom == pctx.uom and not is_free_item:
return item_price[0].price_list_rate
return 0.0