@if ($paymenthistories)
@csrf @foreach ($paymenthistories as $item) @endforeach
# UID Name Roll Class Session Group Year Payment Method Date Transaction No Amount Action
{{ $loop->iteration }} {{ optional($item->studentuser)->uid }} {{ optional($item->studentuser)->name }} {{ optional($item->studentuser)->roll }} {{ optional($item->classtype)->name }} {{ optional($item->session)->name }} {{ optional($item->group)->name }} {{ optional($item->classyear)->name }} {{ optional($item->paymentmethod)->name }} {{ $item->payment_date->format('d-m-Y') }} {{ $item->receipt }} {{ number_format($item->amount, 2) }} Print
Total Amount {{ number_format($paymenthistories->sum('amount'), 2) }}
@endif