@extends('fronted.layout.main') @section('adcontent')
@php $totalAmount = 0; @endphp
@foreach ($reportData as $category) @php $totalAmount += $category['amount']; @endphp

Category Name: {{ $category['category_name'] }}{{ number_format($category['amount'], 2) }}

@foreach ($category['details'] as $index => $detail) @endforeach
S No Date Item Name Quantity Rate Amount Payment Type
{{ $index + 1 }} {{ $detail['date'] }} {{ $detail['item_name'] }} {{ $detail['quantity'] }} {{ $detail['rate'] }} {{ number_format($detail['amount'], 2) }} {{ $detail['payment_type'] }}
@endforeach

Total Amount {{ number_format($totalAmount, 2) }}

@endsection