@php $name = "Stock Track {$product->productName}"; @endphp @extends('admin.layouts.master') @section('title', $name) @section('content')
Filter
@include('admin.includes.msg')
@if(!empty($alldata)) @foreach($alldata as $key=>$val) @php $totalamount=0; @endphp @if(@$val['purchase']) @foreach($val['purchase'] as $k=>$v) @php $totalamount+=$v->currentStock; @endphp @endforeach @endif @if(@$val['sell']) @foreach($val['sell'] as $k=>$v) @if(Auth::user()->role!=7) @php $totalamount-=$v->currentStock; @endphp @else @if($v->return_quantity>0) @php if(($v->orderreturn==1) || ($v->orderStatus == 'Cancel')){ $totalamount-=($v->quantity+$v->return_quantity); }else{ $totalamount-=$v->quantity; } @endphp @else @if($v->orderStatus == 'Cancel') @elseif($v->orderStatus == 'Deleted') @else @endif @php if($v->orderStatus == 'Deleted'){}else{ $totalamount-=$v->quantity; } @endphp @endif @endif @endforeach @endif @if(@$val['return']) @foreach($val['return'] as $k=>$v) @php if(Auth::user()->role!=7){ $totalamount+=$v->request_to_return; }else{ $totalamount-=$v->request_to_return; } @endphp @endforeach @endif @if(@$val['ExchangeFrom']) @foreach($val['ExchangeFrom'] as $k=>$v) @php $totalamount-=$v->fromProductQnt; @endphp @endforeach @endif @if(@$val['ExchangeTo']) @foreach($val['ExchangeTo'] as $k=>$v) @php $totalamount+=$v->toProductQnt; @endphp @endforeach @endif @endforeach @endif
Date Type Invoice Inward Outward
{{ \Carbon\Carbon::parse($key)->format('F j, Y') }}
@endsection