fix: not able to fetch batch item price
This commit is contained in:
@@ -940,11 +940,12 @@ def get_batch_based_item_price(params, item_code) -> float:
|
|||||||
params = parse_json(params)
|
params = parse_json(params)
|
||||||
|
|
||||||
item_price = get_item_price(params, item_code, force_batch_no=True)
|
item_price = get_item_price(params, item_code, force_batch_no=True)
|
||||||
|
|
||||||
if not item_price:
|
if not item_price:
|
||||||
item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True)
|
item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True)
|
||||||
|
|
||||||
if item_price and item_price[0].uom == params.get("uom"):
|
if item_price and item_price[0][2] == params.get("uom"):
|
||||||
return item_price[0].price_list_rate
|
return item_price[0][1]
|
||||||
|
|
||||||
return 0.0
|
return 0.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user