From 3c594bfdf34db6f66bc5bfded276c011e861fcb5 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sun, 4 Oct 2026 15:14:30 +0530 Subject: [PATCH] Added logic for current date in sticker pdf service --- app/Services/StickerPdfService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Services/StickerPdfService.php b/app/Services/StickerPdfService.php index 87c67e4c..77f29da7 100644 --- a/app/Services/StickerPdfService.php +++ b/app/Services/StickerPdfService.php @@ -1054,6 +1054,7 @@ class StickerPdfService $plantName = $itemCharacteristic?->plant?->name ?? ''; $plantAddress = $itemCharacteristic?->plant?->address ?? ''; $dateOfTest = $itemCharacteristic?->created_at?->format('d.m.Y') ?? ''; + $currentDate = $itemCharacteristic?->created_at?->format('M-y') ?? ''; foreach ($dynamicElements as $element) { @@ -1116,7 +1117,7 @@ class StickerPdfService $textValue = $plantAddress; } if ($row->characteristics_type == 'current_date') { - $textValue = date('M-y'); + $textValue = $currentDate; } if ($row->characteristics_type == 'date_of_test') { $textValue = $dateOfTest; -- 2.49.1