From 4a7fc1506f8f9f5ee1c65c9e073e6e57c137c391 Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Thu, 10 Aug 2023 09:40:58 +0530 Subject: [PATCH] fix: don't show disabled items in `Item Shortage Report` (#36550) --- .../report/item_shortage_report/item_shortage_report.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/report/item_shortage_report/item_shortage_report.py b/erpnext/stock/report/item_shortage_report/item_shortage_report.py index 9fafe91c3f..4bd9a107e2 100644 --- a/erpnext/stock/report/item_shortage_report/item_shortage_report.py +++ b/erpnext/stock/report/item_shortage_report/item_shortage_report.py @@ -40,7 +40,12 @@ def get_data(filters): item.item_name, item.description, ) - .where((bin.projected_qty < 0) & (wh.name == bin.warehouse) & (bin.item_code == item.name)) + .where( + (item.disabled == 0) + & (bin.projected_qty < 0) + & (wh.name == bin.warehouse) + & (bin.item_code == item.name) + ) .orderby(bin.projected_qty) )