diff --git a/app/Http/Controllers/PdfController.php b/app/Http/Controllers/PdfController.php index 8856cdb..a3bd0b7 100644 --- a/app/Http/Controllers/PdfController.php +++ b/app/Http/Controllers/PdfController.php @@ -913,6 +913,11 @@ class PdfController extends Controller $itemCharacteristicId = $request->query('item_characteristic_id'); $stickerId = trim($stickerId); + // Normalize "empty" or "" to null + $plantId = ($plantId && $plantId != 'empty') ? $plantId : null; + $itemCharacteristicId = ($itemCharacteristicId && $itemCharacteristicId != 'empty') ? $itemCharacteristicId : null; + + if ($plantId && $itemCharacteristicId) { $plantId = $request->query('plant_id');