| SL |
Outlet Name |
Product Name |
Unit |
Balance |
Last Price |
Previous Price |
AVG Price |
Total Amt. |
@if (!empty($reportData))
@php
$sl = 1;
@endphp
@foreach ($reportData as $key => $stock)
@php
$lastPrice = Helper::lastPrice(['product_id' => $stock->product_id]);
if(empty($lastPrice)){
$lastPrice = Helper::lastPrice2(['id' => $stock->product_id]);
}
$avgPrice = Helper::avgPrice(['product_id' => $stock->product_id]);
if(empty($avgPrice)){
$avgPrice = $lastPrice;
}
$previousPrice = Helper::previousPrice(['product_id' => $stock->product_id]);
@endphp
| {{$sl++}} |
{{$stock->outlet_name}} |
{{$stock->product_name}} |
{{$stock->unit_name}} |
{{$stock->balanceinhand}} |
{{$lastPrice}} |
{{$previousPrice}} |
{{$avgPrice}} |
{{$stock->balanceinhand*$avgPrice}} |
@endforeach
@endif
@endsection
@push('scripts')
@endpush