Report Expense
Expense Report
# |
Name |
Account Type |
Amount |
@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
{{++$c}} |
{{$row->name}} |
{{$row->account_type}} |
{{$amount}} |
@endforeach
{{++$c}} |
Voucher |
Expense |
{{$vouchers}} |
@php $total += $vouchers; @endphp
Total: {{$total}} |
{{-- @endif --}}