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);
}
$user = User::where('plant_id', $plantId)
->where('name', $data['scanned_by'])
$user = User::where('name', $data['scanned_by'])
->first();
if (!$user) {