@php
$debitTotal = $totals['debit'] ?? 0;
$creditTotal = $totals['credit'] ?? 0;
$grossProfit = $grossProfit ?? 0;
@endphp
| Date |
Branch |
Expense |
Income |
Balance (Income - Expense) |
@php
$balance = 0;
$totalDebit = 0;
$totalCredit = 0;
@endphp
@foreach($ledgerData as $entry)
@php
$date = $entry->entry_date ?? '-';
$voucher = $entry->voucher_no ?? '-';
$outlet_name = $entry->outlet_name ?? '-';
$accountName = $entry->account_name ?? '-';
$debit = (float) ($entry->debit_amount ?? 0);
$credit = (float) ($entry->credit_amount ?? 0);
$balance += ($credit - $debit);
$totalDebit += $debit;
$totalCredit += $credit;
@endphp
| {{ ($date!='-')?Helper::dateFormate($date):'-' }} |
{{ $outlet_name }} |
{{ number_format($debit, 2) }} |
{{ number_format($credit, 2) }} |
{{ number_format($balance, 2) }} |
@endforeach
| Grand Total |
{{ number_format($totalDebit, 2) }} |
{{ number_format($totalCredit, 2) }} |
{{ number_format($balance, 2) }} |
@endsection
@push('scripts')
@endpush