Changed query logic in production mail report #1191

Merged
jothi merged 1 commits from ranjith-dev into master 2026-10-07 03:10:32 +00:00

View File

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