mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 07:29:22 +00:00
get_incoming_rate_zero_in_rate_fix
This commit is contained in:
committed by
Devin Slauenwhite
parent
62b7a8d21a
commit
1df3b608ec
@@ -301,10 +301,10 @@ def get_incoming_rate(args, raise_error_if_no_rate=True):
|
|||||||
in_rate = (
|
in_rate = (
|
||||||
_get_fifo_lifo_rate(previous_stock_queue, args.get("qty") or 0, valuation_method)
|
_get_fifo_lifo_rate(previous_stock_queue, args.get("qty") or 0, valuation_method)
|
||||||
if previous_stock_queue
|
if previous_stock_queue
|
||||||
else 0
|
else None
|
||||||
)
|
)
|
||||||
elif valuation_method == "Moving Average":
|
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:
|
if in_rate is None:
|
||||||
in_rate = get_valuation_rate(
|
in_rate = get_valuation_rate(
|
||||||
|
|||||||
Reference in New Issue
Block a user