Added logic for current date in sticker pdf service #1162
@@ -1054,6 +1054,7 @@ class StickerPdfService
|
|||||||
$plantName = $itemCharacteristic?->plant?->name ?? '';
|
$plantName = $itemCharacteristic?->plant?->name ?? '';
|
||||||
$plantAddress = $itemCharacteristic?->plant?->address ?? '';
|
$plantAddress = $itemCharacteristic?->plant?->address ?? '';
|
||||||
$dateOfTest = $itemCharacteristic?->created_at?->format('d.m.Y') ?? '';
|
$dateOfTest = $itemCharacteristic?->created_at?->format('d.m.Y') ?? '';
|
||||||
|
$currentDate = $itemCharacteristic?->created_at?->format('M-y') ?? '';
|
||||||
|
|
||||||
|
|
||||||
foreach ($dynamicElements as $element) {
|
foreach ($dynamicElements as $element) {
|
||||||
@@ -1116,7 +1117,7 @@ class StickerPdfService
|
|||||||
$textValue = $plantAddress;
|
$textValue = $plantAddress;
|
||||||
}
|
}
|
||||||
if ($row->characteristics_type == 'current_date') {
|
if ($row->characteristics_type == 'current_date') {
|
||||||
$textValue = date('M-y');
|
$textValue = $currentDate;
|
||||||
}
|
}
|
||||||
if ($row->characteristics_type == 'date_of_test') {
|
if ($row->characteristics_type == 'date_of_test') {
|
||||||
$textValue = $dateOfTest;
|
$textValue = $dateOfTest;
|
||||||
|
|||||||
Reference in New Issue
Block a user