@extends('admin.admin_dashboard') @section('admin')

@php $totalIn = 0; $totalOut = 0; $totalValue = 0; @endphp @foreach($ledger as $row) @php $totalIn += $row['qty_in']; $totalOut += $row['qty_out']; $totalValue += $row['value']; @endphp @endforeach
Date Type Qty In Qty Out Rate Value Stock Balance
{{ $row['date'] }} {{ ucfirst($row['type']) }} {{ $row['qty_in'] }} {{ $row['qty_out'] }} {{ number_format($row['rate'], 2) }} {{ number_format($row['value'], 2) }} {{ $row['stock_balance'] }}
Total {{ $totalIn }} {{ $totalOut }} {{ number_format($totalValue, 2) }} {{ $stockBalance }}
@endsection