From a3e089bf27da7125ecda33a1729fc2b7f41567eb Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 11 Apr 2024 17:35:06 +0530 Subject: [PATCH] fix: zero division error --- erpnext/controllers/selling_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 668241b08ca..aee30b63c9d 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -438,7 +438,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 -- GitLab