@extends(isset($input['print']) && $input['print']==1 ? 'layouts.general' : 'layouts.app') @section('link') @if(isset($input) && (!isset($input['print']) || $input['print']==1)) @endif @endsection @section('style') @endsection @section('content')
@include('shared.messages')

{{__('texte.references_arr.stocks.title2')}}
@if(!isset($input['print']) || $input['print']!=1) {{__('texte.references_arr.stocks.references')}} @endif


{{ csrf_field() }}

{{__('texte.references_arr.stocks.general_filters')}}

@if(!isset($input['print']) || $input['print']!=1)
@endif
@include('references.filters.product_filters') @if(!isset($input['print']) || $input['print']!=1)
@endif
@if(isset($stocks) && count($stocks) > 0) @foreach($stocks as $index=>$stock) @if($index==0 || ($index>0 && $stocks[$index]->storage_id!=$stocks[$index-1]->storage_id)) @endif @if($index==0 || ($index>0 && $stocks[$index]->producer_id!=$stocks[$index-1]->producer_id)) @endif @if($index==0 || ($index>0 && $stocks[$index]->product_id!=$stocks[$index-1]->product_id)) @endif @if(!isset($stocks[$index+1]) || $stocks[$index+1]->storage_id!=$stocks[$index]->storage_id) @endif @endforeach
{{__('texte.references_arr.stocks.code')}} {{__('texte.references_arr.stocks.product')}} {{__('texte.references_arr.stocks.quantity')}} {{__('texte.references_arr.stocks.price')}} {{__('texte.references_arr.stocks.value')}} {{__('texte.references_arr.stocks.barcode')}}

{{__('texte.references_arr.stocks.stocks_in')}} {{$stock->storage_name}}

{{$stock->producer_name ?? 'N/A'}}
{{$stock->product_id}} {{$stock->name}} {{$stocks->where('product_id',$stock->product_id)->where('storage_id',$stock->storage_id)->sum('total_quantity')}} {{$stock->price}} {{number_format($stocks->where('product_id',$stock->product_id)->where('storage_id',$stock->storage_id)->sum('total_value'),2,'.',' ')}} {{$stock->piece_barcode}}
{{$stock->expiring_date!=null ? date('d.m.Y',strtotime($stock->expiring_date)) : ''}} {{$stock->batch}} {{$stock->total_quantity}} {{$stock->price}} {{number_format($stock->total_value,2,'.',' ')}} {{$stock->piece_barcode}}
{{__('texte.references_arr.stocks.total_for')}} {{$stock->storage_name}} {{number_format($stocks->where('storage_id',$stock->storage_id)->sum('total_value'),2,'.',' ')}}
{{__('texte.references_arr.stocks.abt_company')}} {{number_format($stocks->sum('total_value'),2,'.',' ')}}
@endif
@if(!isset($input['print']) || $input['print']!=1) @endif @endsection