@extends('layout.default') @section('title', $L('Stock overview')) @section('activeNav', 'stockoverview') @section('viewJsName', 'stockoverview') @section('content')

{{ $L('Stock overview') }} {{ $L('#1 products with #2 units in stock', count($currentStock), SumArrayValue($currentStock, 'amount')) }}

{{ $L('#1 products expiring within the next #2 days', count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('+5 days')), '<')), 5) }}

{{ $L('#1 products are already expired', count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('-1 days')), '<'))) }}

{{ $L('#1 products are below defined min. stock amount', count($missingProducts)) }}

@foreach($currentStock as $currentStockEntry) @endforeach
{{ $L('Product') }} {{ $L('Amount') }} {{ $L('Next best before date') }}
{{ FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name }} {{ $currentStockEntry->amount . ' ' . FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name }} {{ $currentStockEntry->best_before_date }}
@stop