1
0
forked from poc/pds

Refactor user retrieval in updateGR method to simplify query by removing unnecessary plant_id condition

This commit is contained in:
dhanabalan
2025-09-27 16:49:17 +05:30
parent 071627ccd4
commit 0d9fd498d6

View File

@@ -92,8 +92,7 @@ class PdfController extends Controller
], 400); ], 400);
} }
$user = User::where('plant_id', $plantId) $user = User::where('name', $data['scanned_by'])
->where('name', $data['scanned_by'])
->first(); ->first();
if (!$user) { if (!$user) {