1
0
forked from poc/pds

Added logic for order by fg line in production report

This commit is contained in:
dhanabalan
2026-09-28 08:17:41 +05:30
parent 6ae93b3a13
commit 214c065a34

View File

@@ -142,7 +142,10 @@ class SendProductionReport extends Command
foreach ($plants as $plant) {
$lines = Line::where('plant_id', $plant->id)->get();
// $lines = Line::where('plant_id', $plant->id)->get();
$lines = Line::where('plant_id', $plant->id)
->orderByRaw("CASE WHEN LOWER(type) = 'fg line' THEN 0 ELSE 1 END")
->get();
foreach ($lines as $line) {