Merge pull request 'commented logic for asrs' (#679) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #679
This commit was merged in pull request #679.
This commit is contained in:
@@ -308,13 +308,14 @@ class AsrsItemValidationResource extends Resource
|
|||||||
|
|
||||||
if (! empty($data['Plant'])) {
|
if (! empty($data['Plant'])) {
|
||||||
$query->where('plant_id', $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'])) {
|
if (! empty($data['item_code'])) {
|
||||||
$query->where('item_code', 'like', '%'.$data['item_code'].'%');
|
$query->where('item_code', 'like', '%'.$data['item_code'].'%');
|
||||||
|
|||||||
Reference in New Issue
Block a user