Report Expense

Expense Report

@php $total = 0; $c=0; @endphp @foreach($accounts as $row) @php // dd($row->id); $amount = App\Models\Payment::where('account_id', $row->id) ->where('vochure_id', 0) ->whereBetween('timestamp', [$fromDate, $toDate]) ->sum('amount'); $total += $amount; @endphp @endforeach @php $total += $vouchers; @endphp
# Name Account Type Amount
{{++$c}} {{$row->name}} {{$row->account_type}} {{$amount}}
{{++$c}} Voucher Expense {{$vouchers}}
Total: {{$total}}
{{-- @endif --}}