fix: zero division error

This commit is contained in:
Rohit Waghchaure
2024-04-11 17:35:06 +05:30
parent fc835ed6b1
commit f9e230e758

View File

@@ -441,7 +441,7 @@ class SellingController(StockController):
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