@extends('layouts.admin') @push('styles') @endpush @section('content')
Refresh

Stock Balance Report

@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 @endforeach @endif
SL Outlet Name Product Name Unit Balance Last Price Previous Price AVG Price Total Amt.
{{$sl++}} {{$stock->outlet_name}} {{$stock->product_name}} {{$stock->unit_name}} {{$stock->balanceinhand}} {{$lastPrice}} {{$previousPrice}} {{$avgPrice}} {{$stock->balanceinhand*$avgPrice}}
@endsection @push('scripts') @endpush