@php $totalCredit = 0; @endphp @foreach ($credits as $credit) @php $totalCredit += $credit->amount; @endphp @endforeach
Credit
@lang('Account Name') @lang('Receiver Name') @lang('Date') @lang('Grand Total')
{{ $credit->account_name }} {{ $credit->receiver_name }} {{ $credit->payment_date }} {{ $credit->amount }}
@lang('Total') {{ $totalCredit }}
@php $totalDebit = 0; @endphp @foreach ($debits as $debits) @php $totalDebit += $debits->total; @endphp @endforeach
Debit
@lang('Account Name') @lang('Patient Name') @lang('Date') @lang('Grand Total')
{{ $debits->account_name }} {{ $debits->invoice->user->name }} {{ $debits->invoice->invoice_date }} {{ $debits->total }}
@lang('Total') {{ $totalDebit }}