diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 668241b08cab2afaca6d1ad6ad22f898fcca0c4f..aee30b63c9da3110cdda3792fc18f7b602a845ed 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