ranjith-dev #187

Merged
jothi merged 54 commits from ranjith-dev into master 2026-01-14 06:37:24 +00:00
Showing only changes of commit 041cc11030 - Show all commits

View File

@@ -1181,6 +1181,12 @@ class InvoiceValidationResource extends Resource
if (! empty($data['Plant'])) { // $plant = $data['Plant'] ?? null
$query->where('plant_id', $data['Plant']);
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return $query->whereRaw('1 = 0');
}
}
if (! empty($data['invoice_number'])) {
@@ -1218,6 +1224,12 @@ class InvoiceValidationResource extends Resource
if (! empty($data['Plant'])) {
$indicators[] = 'Plant: '.Plant::where('id', $data['Plant'])->value('name');
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return 'Plant: Choose plant to filter records.';
}
}
if (! empty($data['invoice_number'])) {