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();