Merge pull request #34909 from ihosseinu/get_incoming_rate_v14_fix
Get incoming rate v14 fix
This commit is contained in:
commit
216983a729
@ -256,8 +256,6 @@ def get_incoming_rate(args, raise_error_if_no_rate=True):
|
||||
if isinstance(args, str):
|
||||
args = json.loads(args)
|
||||
|
||||
voucher_no = args.get("voucher_no") or args.get("name")
|
||||
|
||||
in_rate = None
|
||||
if (args.get("serial_no") or "").strip():
|
||||
in_rate = get_avg_purchase_rate(args.get("serial_no"))
|
||||
@ -280,12 +278,13 @@ def get_incoming_rate(args, raise_error_if_no_rate=True):
|
||||
in_rate = (
|
||||
_get_fifo_lifo_rate(previous_stock_queue, args.get("qty") or 0, valuation_method)
|
||||
if previous_stock_queue
|
||||
else 0
|
||||
else None
|
||||
)
|
||||
elif valuation_method == "Moving Average":
|
||||
in_rate = previous_sle.get("valuation_rate") or 0
|
||||
in_rate = previous_sle.get("valuation_rate")
|
||||
|
||||
if in_rate is None:
|
||||
voucher_no = args.get("voucher_no") or args.get("name")
|
||||
in_rate = get_valuation_rate(
|
||||
args.get("item_code"),
|
||||
args.get("warehouse"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user