From 5ae9faab91116fabe663a891d4b343ceffbc65cc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:11:34 +0530 Subject: [PATCH] fix: only include submitted docs for internal received quantity validation (backport #46262) (#46304) fix: only include submitted docs for internal received quantity validation (#46262) (cherry picked from commit 88fcdbb81e5aa95fdf29b17d5cdc6f4cc58ccabd) Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com> --- erpnext/controllers/stock_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index a8f9976c83b..e892c5d27e2 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -1234,7 +1234,7 @@ class StockController(AccountsController): child_tab.item_code, child_tab.qty, ) - .where(parent_tab.docstatus < 2) + .where(parent_tab.docstatus == 1) ) if self.doctype == "Purchase Invoice":