Updated locator_quantity validation on filter report
This commit is contained in:
@@ -354,7 +354,7 @@ class PalletValidationResource extends Resource
|
|||||||
])
|
])
|
||||||
->query(function ($query, array $data) {
|
->query(function ($query, array $data) {
|
||||||
// Hide all records initially if no filters are applied
|
// Hide all records initially if no filters are applied
|
||||||
if (empty($data['Plant']) && empty($data['pallet_number']) && empty($data['serial_number']) && empty($data['pallet_status']) && empty($data['locator_number']) && empty($data['locator_quantity']) && empty($data['created_from']) && empty($data['created_to']) && empty($data['created_by']) && empty($data['scanned_from']) && empty($data['scanned_to']) && empty($data['scanned_by'])) {
|
if (empty($data['Plant']) && empty($data['pallet_number']) && empty($data['serial_number']) && empty($data['pallet_status']) && empty($data['locator_number']) && $data['locator_quantity'] == null && empty($data['created_from']) && empty($data['created_to']) && empty($data['created_by']) && empty($data['scanned_from']) && empty($data['scanned_to']) && empty($data['scanned_by'])) {
|
||||||
return $query->whereRaw('1 = 0');
|
return $query->whereRaw('1 = 0');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -382,8 +382,8 @@ class PalletValidationResource extends Resource
|
|||||||
// $query->where('locator_quantity', $data['locator_quantity']);
|
// $query->where('locator_quantity', $data['locator_quantity']);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (isset($data['locator_quantity']) && $data['locator_quantity'] != '') {
|
if ($data['locator_quantity'] != null && $data['locator_quantity'] != '') { //isset($data['locator_quantity']) &&
|
||||||
$query->where('locator_quantity', (int)$data['locator_quantity']);
|
$query->where('locator_quantity', $data['locator_quantity']);//(int)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($data['created_from'])) {
|
if (!empty($data['created_from'])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user