Solved bug in production mail report
Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m23s
Laravel Larastan / larastan (pull_request) Failing after 4m38s
Laravel Pint / pint (pull_request) Successful in 5m10s
Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m23s
Laravel Larastan / larastan (pull_request) Failing after 4m38s
Laravel Pint / pint (pull_request) Successful in 5m10s
This commit is contained in:
@@ -258,13 +258,17 @@ class SendProductionReport extends Command
|
||||
|
||||
$productionQuantity = \App\Models\QualityValidation::where('plant_id', $plant->id)
|
||||
->where('line_id', $line->id)
|
||||
->whereIn('item_id', $itemIds)
|
||||
->whereHas('stickerMaster', function ($query) use ($itemIds) {
|
||||
$query->whereIn('item_id', $itemIds);
|
||||
})
|
||||
->whereBetween('created_at', [$startDate, $endDate])
|
||||
->count();
|
||||
|
||||
$nonPlannedproductionQuantity = \App\Models\QualityValidation::where('plant_id', $plant->id)
|
||||
->where('line_id', $line->id)
|
||||
->whereNotIn('item_id', $itemIds)
|
||||
->whereHas('stickerMaster', function ($query) use ($itemIds) {
|
||||
$query->whereIn('item_id', $itemIds);
|
||||
})
|
||||
->whereBetween('created_at', [$startDate, $endDate])
|
||||
->count();
|
||||
|
||||
@@ -297,7 +301,9 @@ class SendProductionReport extends Command
|
||||
|
||||
$dayproductionQuantity = \App\Models\QualityValidation::where('plant_id', $plant->id)
|
||||
->where('line_id', $line->id)
|
||||
->whereIn('item_id', $itemIds)
|
||||
->whereHas('stickerMaster', function ($query) use ($itemIds) {
|
||||
$query->whereIn('item_id', $itemIds);
|
||||
})
|
||||
->whereBetween('created_at', [
|
||||
$startDate->copy()->setTime(8, 0, 0),
|
||||
$startDate->copy()->setTime(19, 30, 0),
|
||||
@@ -306,7 +312,9 @@ class SendProductionReport extends Command
|
||||
|
||||
$nightproductionQuantity = \App\Models\QualityValidation::where('plant_id', $plant->id)
|
||||
->where('line_id', $line->id)
|
||||
->whereIn('item_id', $itemIds)
|
||||
->whereHas('stickerMaster', function ($query) use ($itemIds) {
|
||||
$query->whereIn('item_id', $itemIds);
|
||||
})
|
||||
->whereBetween('created_at', [
|
||||
$startDate->copy()->setTime(19, 30, 0),
|
||||
$endDate->copy()->setTime(8, 0, 0),
|
||||
|
||||
Reference in New Issue
Block a user