From 5f472cf0d4f17aa88a129bb3b44ccf0e3c9ef8c2 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 7 Oct 2026 08:40:16 +0530 Subject: [PATCH] Changed query logic in production mail report --- app/Console/Commands/SendProductionReport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/SendProductionReport.php b/app/Console/Commands/SendProductionReport.php index c74fbf8a..6c01eaa9 100644 --- a/app/Console/Commands/SendProductionReport.php +++ b/app/Console/Commands/SendProductionReport.php @@ -267,7 +267,7 @@ class SendProductionReport extends Command $nonPlannedproductionQuantity = \App\Models\QualityValidation::where('plant_id', $plant->id) ->where('line_id', $line->id) ->whereHas('stickerMaster', function ($query) use ($itemIds) { - $query->whereIn('item_id', $itemIds); + $query->whereNotIn('item_id', $itemIds); }) ->whereBetween('created_at', [$startDate, $endDate]) ->count();