Skip to content

Commit

Permalink
fix: zero division error
Browse files Browse the repository at this point in the history
(cherry picked from commit f9e230e)
  • Loading branch information
rohitwaghchaure authored and mergify[bot] committed Apr 11, 2024
1 parent 3b166ea commit e9c6c5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/controllers/selling_controller.py
Expand Up @@ -444,7 +444,7 @@ def set_incoming_rate(self):
get_valuation_method(d.item_code) == "Moving Average" and self.get("is_return")
):
# Get incoming rate based on original item cost based on valuation method
qty = flt(d.get("stock_qty") or d.get("actual_qty"))
qty = flt(d.get("stock_qty") or d.get("actual_qty") or d.get("qty"))

if (
not d.incoming_rate
Expand Down

0 comments on commit e9c6c5a

Please sign in to comment.