From 560619beb5846cbb4fb6c1f2cda7f5c561c10917 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 23 Dec 2025 11:49:01 +0530 Subject: [PATCH] Added logic in pdf controller --- app/Http/Controllers/PdfController.php | 5 +++++ 1 file changed, 5 insertions(+) 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');