Report Parameters
Report Parameters

@error('selectedBranch') {{ $message }} @enderror @if($branchSearchVisible == true)
  • @if(auth()->user()->access_scope == 0) @endif @if(auth()->user()->access_scope == 1 || auth()->user()->access_scope == 0) @endif @if(auth()->user()->access_scope == 2 || auth()->user()->access_scope == 0) @endif @if(auth()->user()->access_scope == 3 || auth()->user()->access_scope == 0) @endif @foreach($branch_selection as $branch) @endforeach
@endif
@error('transaction_date') {{ $message }} @enderror
Generating Report..
Out of Stock Report
Report Date: {{ date('M j, Y g:i:s a',strtotime(now()))}} Generated By: {{ auth()->user()->name}}
Coverage: {{date('M j, Y',strtotime($transaction_date))}}
*Note: Coverage date is based on Actual Date.
OOS means item is out of stock during specified hour.
NA means no data recorded during specified hour.
@if(empty($data))
Item Code and Description 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
NO DATA
@else @foreach($branches->whereIn('id', $data->pluck('branch_id')->unique()) as $b) @if($data->where('branch_id',$b->id)->count() > 0) @foreach($data->pluck('item_code')->unique() as $item) @php $b_data= $data->where('branch_id',$b->id)->where('item_code',$item); $min_hour = $b_data->min('hour'); $first = $b_data->where('hour',$min_hour)->first(); $beginning = $first->beginning; $running = $beginning; @endphp @if($b_data->sum('beginning') > 0 || $b_data->sum('s_ins') > 0 || $b_data->sum('s_outs') > 0) @php $arr=[]; for ($i = 0; $i < 24; $i++){ $r_data = $b_data->where('hour',$i)->first(); if(!is_null($r_data)){ $running += ($r_data->s_ins - $r_data->s_outs); if($running <= 0){ array_push($arr,'OOS'); }else{ array_push($arr,''); } }else{ array_push($arr,'NA'); } } @endphp @if(in_array('OOS',$arr)) @foreach($arr as $v) @endforeach @endif @endif @endforeach
{{ $b->branch_code}} {{ $b->branch_name}}
Item Code and Description 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
{{ $first->item_code.':'}} {{$first->item_description}} $v == 'OOS','text-secondary' => $v == 'NA'])>{{ $v }}
@endif @endforeach @endif
@push('custom-scripts') @endpush