Merge pull request 'Changed query logic in production mail report' (#1191) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s

Reviewed-on: #1191
This commit was merged in pull request #1191.
This commit is contained in:
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();