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

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

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

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

{{ count($missingProducts) }} products are below defined min. stock amount

@foreach($currentStock as $currentStockEntry) @endforeach
Product Amount 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