From ba289d6e6aa3583c800692c6212243a666435573 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Fri, 1 Apr 2022 22:10:24 +0200 Subject: [PATCH] Optimized location content sheet layout / don't show empty locations --- views/locationcontentsheet.blade.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/views/locationcontentsheet.blade.php b/views/locationcontentsheet.blade.php index 9dc619d2..a63a5a6b 100644 --- a/views/locationcontentsheet.blade.php +++ b/views/locationcontentsheet.blade.php @@ -70,6 +70,9 @@
@foreach($locations as $location) +@if(FindAllObjectsInArrayByPropertyValue($currentStockLocationContent, 'location_id', $location->id) == null) +@continue +@endif

-
+
@@ -99,10 +102,10 @@ @php $currentStockEntriesForLocation = FindAllObjectsInArrayByPropertyValue($currentStockLocationContent, 'location_id', $location->id); @endphp @foreach($currentStockEntriesForLocation as $currentStockEntry) - -
+ {{ FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name }} + {{ $currentStockEntry->amount }} {{ $__n($currentStockEntry->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name_plural, true) }} @if($currentStockEntry->amount_opened > 0){{ $__t('%s opened', $currentStockEntry->amount_opened) }}@endif