|
Reconciliation Summary
|
@php
$beginning_of_month = \Carbon\Carbon::parse($report->reconciliation_period)->startOfMonth()->toDateTimeString();
@endphp
|
Stre@mline Opening Balance As Of {{ streamline_date($beginning_of_month) }}:
|
{{ ugandan_shillings($report->opening_streamline_balance) }}
|
|
Bank Statement Ending Balance As Of {{ streamline_date($report->reconciliation_period) }}:
|
{{ ugandan_shillings($report->ending_bank_statement_balance) }}
|
|
@php
$banking_record = get_latest_banking_record($report->bank, $report->reconciliation_period);
$bank_balance_that_day = ($banking_record != null) ? (int)$banking_record->account_balance : 0;
$orderByCreatedAtIfTransDateIsTheSame = "created_at DESC";
$orderByIdIfTransDateIsTheSame = "id DESC";
$last_record_that_month = DB::table('banking')
->whereNull('deleted_at')
->where('bank', '=', $report->bank)
->where('memo', '!=', 'bank reconciliation adjustment')
->whereDate('trans_date', '<=', \Carbon\Carbon::parse($report->reconciliation_period)->toDateString())
->orderBy('trans_date', 'desc')
->orderByRaw($orderByCreatedAtIfTransDateIsTheSame)
->orderByRaw($orderByIdIfTransDateIsTheSame)
->first();
$last_running_balance_of_month = ($last_record_that_month != null) ? (int)$last_record_that_month->account_balance : 0;
@endphp
Bank Register Closing Balance As Of {{ streamline_date($report->reconciliation_period) }}:
|
{{ ugandan_shillings($last_running_balance_of_month) }}
|
@php
$last_banking_record = \Streamline\Models\Banking::where('reconciled',$report->id)->orderBy('id', 'desc')->first();
@endphp
@if ($last_banking_record->memo == "bank reconciliation adjustment")
| Reconciliation Discrepancy Balance : |
{{ $last_banking_record->credit ? ugandan_shillings($last_banking_record->credit) : "-".ugandan_shillings(abs($last_banking_record->debit)) }}
|
@else
Reconciliation Discrepancy Balance : |
{{ ugandan_shillings(0) }}
|
@endif
@if ($report->memo)
| Memo : |
{{ $report->memo }}
|
@endif
Cleared Transactions
Checks and Payments
@if(count($reconciled_transactions) > 0)
| From |
To |
Memo |
Date |
Amount |
@foreach($reconciled_transactions as $trans_id)
@php $transaction = \Streamline\Models\Banking::find($trans_id); @endphp
@if(!is_null($transaction))
@if($transaction->trans_type == 'PAYMENT' || $transaction->trans_type == 'TRANSFER')
| {{ $chart_of_accounts[$transaction->bank] }} |
@php
$other_accounts_array = explode(',',$transaction->other_accounts);
@endphp
@for($x = 0; $x < count($other_accounts_array); $x ++)
@if(isset($chart_of_accounts[$other_accounts_array[$x]]))
{{ $chart_of_accounts[$other_accounts_array[$x]] }}
@else
@php
$item = isset($payment_items[$other_accounts_array[$x]]) ? $payment_items[$other_accounts_array[$x]] : "";
@endphp
{{ $item }}
@endif
@endfor
|
{{ $transaction->memo }} |
{{ streamline_date($transaction->trans_date) }} |
@php $total_cleared_debit += (int)$transaction->debit; @endphp
- {{ ugandan_shillings($transaction->debit) }} |
@endif
@endif
@endforeach
@endif
Deposits and Credits
| From |
To |
Memo |
Date |
Amount |
@if(count($reconciled_transactions) > 0)
@foreach($reconciled_transactions as $trans_id)
@php $transaction = \Streamline\Models\Banking::find($trans_id); @endphp
@if(!is_null($transaction))
@if($transaction->trans_type == 'DEPOSIT')
@php $other_accounts_array = explode(',',$transaction->other_accounts); @endphp
|
@for($x = 0; $x < count($other_accounts_array); $x ++)
@if(isset($chart_of_accounts[$other_accounts_array[$x]]))
{{ $chart_of_accounts[$other_accounts_array[$x]] }}
@else
@php
$item = isset($payment_items[$other_accounts_array[$x]]) ? $payment_items[$other_accounts_array[$x]] : "";
@endphp
{{ $item }}
@endif
@endfor
|
{{ $chart_of_accounts[$transaction->bank] }} |
{{ $transaction->memo }} |
{{ streamline_date($transaction->trans_date) }} |
@php $total_cleared_credit += (int)$transaction->credit; @endphp
{{ ugandan_shillings($transaction->credit) }} |
@endif
@endif
@endforeach
@endif
Total Cleared Balance : {{ ugandan_shillings($total_cleared = ($total_cleared_credit - $total_cleared_debit)) }}
Uncleared Transactions
Checks and Payments
@if(count($unreconciled_transactions) > 0)
| From |
To |
Memo |
Date |
Amount |
@foreach($unreconciled_transactions as $trans_id)
@php $transaction = \Streamline\Models\Banking::find($trans_id); @endphp
@if(!is_null($transaction))
@if($transaction->trans_type == 'PAYMENT' || $transaction->trans_type == 'TRANSFER')
| {{ $chart_of_accounts[$transaction->bank] }} |
@php
$uncleared_other_accounts_string = $transaction->other_accounts;
$uncleared_other_accounts_array = is_null($uncleared_other_accounts_string) ? [] : explode(",", $uncleared_other_accounts_string);
@endphp
@for($x = 0; $x < count($uncleared_other_accounts_array); $x ++)
@if(isset($chart_of_accounts[$uncleared_other_accounts_array[$x]]))
{{ $chart_of_accounts[$uncleared_other_accounts_array[$x]] }}
@else
@php
$item = $payment_items[$uncleared_other_accounts_array[$x]] ?? "";
@endphp
{{ $item }}
@endif
@endfor
|
{{ $transaction->memo }} |
{{ streamline_date($transaction->trans_date) }} |
@php $total_uncleared_debit += (int)$transaction->debit; @endphp
{{ ugandan_shillings($transaction->debit) }} |
@endif
@endif
@endforeach
@endif
Deposits and Credits
|
|
|
|
|
|
|
|
|
|
|
| From |
To |
Memo |
Date |
Amount |
@if(count($unreconciled_transactions) > 0)
@foreach($unreconciled_transactions as $trans_id)
@php $transaction = \Streamline\Models\Banking::find($trans_id)@endphp
@if(!is_null($transaction))
@if($transaction->trans_type == 'DEPOSIT')
@php $other_accounts_array = explode(',',$transaction->other_accounts); @endphp
|
@for($x = 0; $x < count($other_accounts_array); $x ++)
@if(isset($chart_of_accounts[$other_accounts_array[$x]]))
{{ $chart_of_accounts[$other_accounts_array[$x]] }}
@else
@php
$item = isset($payment_items[$other_accounts_array[$x]]) ? $payment_items[$other_accounts_array[$x]] : "";
@endphp
{{ $item }}
@endif
@endfor
|
{{ $chart_of_accounts[$transaction->bank] }} |
{{ $transaction->memo }} |
{{ streamline_date($transaction->trans_date) }} |
@php $total_uncleared_credit += (int)$transaction->credit; @endphp
{{ ugandan_shillings($transaction->credit) }} |
@endif
@endif
@endforeach
@endif
Total Uncleared Balance : {{ ugandan_shillings($total_uncleared = ($total_uncleared_credit - $total_uncleared_debit)) }}
| Reconciled By: |
{{ get_full_name($report->created_by, "id", "first_name", "last_name", "users")}}
|
| Checked By: |
................................. |
| Approved By: |
.................................. |
{{-- @php
$last_banking_record = \Streamline\Models\Banking::where('reconciled',$report->id)->orderBy('id', 'desc')->first();
@endphp
@if ($last_banking_record->memo == "bank reconciliation adjustment")
Reconciliation Discrepancy Balance : {{ $last_banking_record->credit ? ugandan_shillings($last_banking_record->credit) : "-".ugandan_shillings(abs($last_banking_record->debit))}}
@else
Reconciliation Discrepancy Balance : {{ ugandan_shillings(0) }}
@endif
@php $beginning_of_month = \Carbon\Carbon::parse($report->reconciliation_period)->startOfMonth()->toDateTimeString(); @endphp
Stre@mline Opening Balance ({{ streamline_date($beginning_of_month) }}): {{ ugandan_shillings($report->opening_streamline_balance) }}
Bank Statement Ending Balance ({{ streamline_date($report->reconciliation_period) }}): {{ ugandan_shillings($report->ending_bank_statement_balance) }}
@php
$banking_record = get_latest_banking_record($report->bank, $report->reconciliation_period);
$bank_balance_that_day = ($banking_record != null) ? (int)$banking_record->account_balance : 0;
@endphp
Register Bank Closing Balance ({{ streamline_date($report->reconciliation_period) }}): {{ ugandan_shillings($bank_balance_that_day) }} --}}