@extends('layouts.admin') @push('styles') @endpush @section('content')
@error('cat_id') {{ $message }} @enderror
Refresh

Head Office Stock Balance Report

@if (!empty($reportData)) @php $sl = 1; $grandTotal= 0; @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 ($avgPrice < 1) { $avgPrice=$lastPrice; } $previousPrice=Helper::previousPrice(['product_id'=> $stock->product_id]); @endphp @php $grandTotal += $stock->balanceinhand * $lastPrice @endphp @endforeach @endif
SL Category Product Name Unit Balance Price Total Amt.
{{ $sl++ }} {{ $stock->cat_name }} {{ $stock->product_name }} {{ $stock->unit_name }} {{ $stock->balanceinhand }} {{ $lastPrice }} {{ $stock->balanceinhand * $lastPrice }}
Grand Total {{number_format($grandTotal,3)}}
@endsection @push('scripts') @endpush