Guest Account Balance
Report Printed on: {{date('l, F d, Y')}}
Printed By : {{\Auth::user()->nama}}
Report Date: {{date('d-m-Y', strtotime($date))}}
@if(count($bills) > 0) @php $idx = 1; $total_prev_balance = 0; $total_debit = 0; $total_edit = 0; $total_balance = 0; //$debit_summaries = array(); //$edit_summaries = array(); //$balance_summaries = array(); $summaries = array(); @endphp @foreach($bills as $no_bill => $bill) @php $index_bill = 0; $balance = 0; $bill_balance = 0; @endphp @foreach($bill as $key => $item_bill) @php $bill_balance = $balance; $index_bill++; $idx++; @endphp @endforeach @php $total_balance += $bill_balance; @endphp @endforeach @if(count($bills) > 0) @php $total_summary_debit = 0; $total_summary_credit = 0; @endphp @foreach($summaries as $key => $summary) @php $total_summary_credit += array_sum($summary['credit']); $total_summary_debit += array_sum($summary['debit']); @endphp @endforeach {{-- @foreach($edit_summaries as $key => $edit_summary) @endforeach --}} @endif @else @endif
Name RmNo BillNo Description Prev Balance Debit Credit Balance Arrival Transaction Date
{{ $index_bill == 0 ? $item_bill['name'] : '' }} {{ $index_bill == 0 ? $item_bill['rmno'] : '' }} {{ $index_bill == 0 ? $item_bill['billno'] : '' }} {{ $item_bill['description'] }} {{ ribuanWithComma(array_sum($item_bill['prev_balance'])) }} @php $total_prev_balance += array_sum($item_bill['prev_balance']); @endphp {{ ribuanWithComma(array_sum($item_bill['debit'])) }} @php $total_debit += array_sum($item_bill['debit']); $summaries[$key]['label'] = $item_bill['description']; $summaries[$key]['debit'][] = array_sum($item_bill['debit']); @endphp {{ ribuanWithComma(array_sum($item_bill['credit']) * -1) }} @php $total_edit += array_sum($item_bill['credit']); $summaries[$key]['credit'][] = array_sum($item_bill['credit']) * -1; @endphp @php $balance += array_sum($item_bill['prev_balance']) + array_sum($item_bill['debit']) + array_sum($item_bill['credit']); $bill_balance += $balance; @endphp {{ ribuanWithComma($balance) }} {{ $item_bill['arrival'] }} {{ $item_bill['departure'] }} {{ $item_bill['transaction_date'] }}
Total {{ribuanWithComma($total_prev_balance)}} {{ribuanWithComma($total_debit)}} {{ribuanWithComma($total_edit * -1)}} {{ribuanWithComma($total_balance)}}
Outstanding {{ribuanWithComma($total_balance)}}
Stored Guest Ledger Amount {{ribuanWithComma($total_balance)}}
Summary Of Transaction
{{ $summary['label'] }} {{ ribuanWithComma(array_sum($summary['debit'])) }} {{ ribuanWithComma(array_sum($summary['credit'])) }} {{ ribuanWithComma(array_sum($summary['debit']) - array_sum($summary['credit'])) }}
Total {{ ribuanWithComma($total_summary_debit) }} {{ ribuanWithComma($total_summary_credit) }} {{ ribuanWithComma($total_summary_debit - $total_summary_credit) }}
{{ $key }} {{ ribuanWithComma(array_sum($edit_summary)) }} {{ ribuanWithComma(array_sum($balance_summaries[$key])) }}

Tidak Ada Transaksi Hari Ini