From ba40f44959ead59532dc93b786c436313484d804 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Mon, 15 Nov 2021 20:01:27 +0100 Subject: [PATCH] Check for empty instead of string comparison --- views/stockentries.blade.php | 2 +- views/stockoverview.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/stockentries.blade.php b/views/stockentries.blade.php index 0336b3e0..ea944465 100644 --- a/views/stockentries.blade.php +++ b/views/stockentries.blade.php @@ -265,7 +265,7 @@ {{ $stockEntry->purchased_date }} + @if(!empty($stockEntry->purchased_date)) datetime="{{ $stockEntry->purchased_date }} 23:59:59" @endif> {{ $stockEntry->purchased_date }} diff --git a/views/stockoverview.blade.php b/views/stockoverview.blade.php index 24974d5b..1bfd9ddb 100755 --- a/views/stockoverview.blade.php +++ b/views/stockoverview.blade.php @@ -352,7 +352,7 @@ {{ $currentStockEntry->best_before_date }} + @if(!empty($currentStockEntry->best_before_date)) datetime="{{ $currentStockEntry->best_before_date }} 23:59:59" @endif> @foreach(FindAllObjectsInArrayByPropertyValue($currentStockLocations, 'product_id', $currentStockEntry->product_id) as $locationsForProduct)