commented logic for asrs
Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

This commit is contained in:
dhanabalan
2026-05-30 17:19:29 +05:30
parent 3b44cce762
commit ddad5de505

View File

@@ -308,13 +308,14 @@ class AsrsItemValidationResource extends Resource
if (! empty($data['Plant'])) {
$query->where('plant_id', $data['Plant']);
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return $query->whereRaw('1 = 0');
}
}
//else {
// $userHas = Filament::auth()->user()->plant_id;
// if ($userHas && strlen($userHas) > 0) {
// return $query->whereRaw('1 = 0');
// }
// }
if (! empty($data['item_code'])) {
$query->where('item_code', 'like', '%'.$data['item_code'].'%');