@php require_frontend_packages(['datatables', 'animatecss']); @endphp @extends('layout.default') @section('title', $__t('Stock entries')) @push('pageScripts') @endpush @section('content')

@yield('title')


@include('components.productpicker', array( 'products' => $products, 'disallowAllProductWorkflows' => true, 'isRequired' => false, 'additionalGroupCssClasses' => 'mb-0' ))
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)
 {{ $__t('Location') }}
@endif
@include('components.userfields_thead', array( 'userfields' => $userfieldsProducts )) @include('components.userfields_thead', array( 'userfields' => $userfieldsStock )) @foreach($stockEntries as $stockEntry) @include('components.userfields_tbody', array( 'userfields' => $userfieldsProducts, 'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValuesProducts, 'object_id', $stockEntry->product_id) )) @include('components.userfields_tbody', array( 'userfields' => $userfieldsStock, 'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValuesStock, 'object_id', $stockEntry->stock_id) )) @endforeach
Hidden product_id {{ $__t('Product') }} {{ $__t('Amount') }} {{ $__t('Due date') }} {{ $__t('Location') }} {{ $__t('Store') }} {{ $__t('Price') }} {{ $__t('Purchased date') }} Hidden purchased_date {{ $__t('Timestamp') }} {{ $__t('Note') }}
@if(GROCY_FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING) @endif {{ $stockEntry->product_id }} {{$stockEntry->amount}} {{ $stockEntry->amount }} {{ $__n($stockEntry->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->qu_id_stock)->name_plural, true) }} @if($stockEntry->open == 1){{ $__t('Opened') }}@endif {{ $stockEntry->best_before_date }} {{ FindObjectInArrayByPropertyValue($locations, 'id', $stockEntry->location_id)->name }} @if (FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $stockEntry->shopping_location_id) !== null) {{ FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $stockEntry->shopping_location_id)->name }} @endif {{$stockEntry->price}} {!! $__t('%1$s per %2$s', '' . $stockEntry->price * $stockEntry->qu_factor_price_to_stock . '', FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->qu_id_price)->name) !!} {{ $stockEntry->purchased_date }} {{ $stockEntry->purchased_date }} {{ $stockEntry->row_created_timestamp }} {{ $stockEntry->note }}
@include('components.productcard', [ 'asModal' => true ]) @stop