San Roque Hermanas Inc.
MGR BLDG. II, Matina Crossing, Davao City
Tel: (082)299-4103
Cell # 0910-651-1604
Collection
Date:
@php
$specificDate = request('specific_date');
$formattedDate = \Carbon\Carbon::parse($specificDate)->format('d-M-Y');
@endphp
{{ $formattedDate }}
Description |
Voucher # |
Amount (P) |
Collection |
|
P{{ number_format(
$newPaymentsCash->sum('rental_amount') +
$newPaymentsEWCash->sum('waterbill_amount') +
$newPaymentsEWCash->sum('electricbill_amount'),
2
) }}
|
@foreach ($crIncome as $cr)
{{ $cr->property->property_name ?? 'Unknown Property' }} CR
|
— |
P{{ number_format($cr->amount, 2) }}
|
@endforeach
@php
$leaseTotals = [];
@endphp
@foreach ($leases as $lease)
@if (
$lease->security_deposit_paymentmethod === 'Cash' ||
$lease->relief_rental_paymentmethod === 'Cash' ||
$lease->utilities_paymentmethod === 'Cash'
)
@php
$key = $lease->lease_id;
if (!isset($leaseTotals[$key])) {
$leaseTotals[$key] = [
'owners_name' => $lease->client->owners_name,
'property_name' => $lease->property->property_name,
'unit_name' => $lease->unit->unit_name,
'security_deposit' => 0,
'relief_rental' => 0,
'utilities' => 0,
];
}
if ($lease->security_deposit !== null && $lease->security_deposit_paymentmethod === 'Cash') {
$leaseTotals[$key]['security_deposit'] += $lease->security_deposit;
}
if ($lease->relief_rental !== null && $lease->relief_rental_paymentmethod === 'Cash') {
$leaseTotals[$key]['relief_rental'] += $lease->relief_rental;
}
if ($lease->utilities !== null && $lease->utilities_paymentmethod === 'Cash') {
$leaseTotals[$key]['utilities'] += $lease->utilities;
}
@endphp
@endif
@endforeach
@php
$grandTotal = 0;
@endphp
@foreach ($leaseTotals as $lease)
@php
$leaseTotal = $lease['security_deposit'] + $lease['relief_rental'] + $lease['utilities'];
$grandTotal += $leaseTotal;
@endphp
{{ $lease['property_name'] }} - {{ $lease['unit_name'] }} ({{ $lease['owners_name'] }})
|
— |
P{{ number_format($leaseTotal, 2) }}
|
@endforeach
Total Collection
|
P{{ number_format(
$newPaymentsCash->sum('rental_amount') +
$crIncome->sum('amount') +
$newPaymentsEWCash->sum('electricbill_amount') +
$newPaymentsEWCash->sum('waterbill_amount') +
$grandTotal,
2
) }}
|
Expenses
Description |
Voucher # |
Amount (P) |
@foreach ($expenses->groupBy('date') as $date => $expensesOnDate)
@php $voucher = $expensesOnDate->first()->Voucher; @endphp
@foreach ($expensesOnDate as $index => $expense)
{{ $expense->remarks }} |
@if ($index === 0)
{{ $voucher }} |
@endif
P {{ number_format($expense->expenses_amount, 2) }} |
@endforeach
@endforeach
Total Expenses: |
P {{ number_format($expenses->sum('expenses_amount'), 2) }} |
Total Income
Total Income
P
{{ number_format($newPaymentsCash->sum('rental_amount') + $newPaymentsEWCash->sum('waterbill_amount') + $newPaymentsEWCash->sum('electricbill_amount') + $crIncome->sum('amount') + $grandTotal, 2) }}
Less Expenses
{{ number_format($expenses->sum('expenses_amount'), 2) }}
Net Income:
P
{{ number_format($newPaymentsCash->sum('rental_amount') + $newPaymentsEWCash->sum('waterbill_amount') + $newPaymentsEWCash->sum('electricbill_amount') + $crIncome->sum('amount') + $grandTotal - $expenses->sum('expenses_amount'), 2) }}
Check Expenses
Description |
Check # |
Check Date |
Voucher # |
Amount (P) |
@foreach ($checkExpenses as $checkExpense)
{{ $checkExpense->remarks }} |
{{ $checkExpense->check_number }} |
{{ $checkExpense->check_date }} |
V#{{ $checkExpense->Voucher }} |
P {{ number_format($checkExpense->expenses_amount, 2) }} |
@endforeach
Total Check Expenses: |
P {{ number_format($checkExpenses->sum('expenses_amount'), 2) }} |
Check Income
@foreach ($newPaymentsCheck as $payment)
{{ $payment->payment->lease->unit->unit_name ?? 'Unknown Unit' }} -
{{ $payment->payment->lease->property->property_name ?? 'Unknown Property' }}
Check #: {{ $payment->check_no }}
{{ $payment->date }}
{{ number_format($payment->rental_amount, 2) }}
@endforeach
@php
$leasesGrouped = [];
@endphp
@foreach ($leases as $lchek)
@php
$leaseId = $lchek->lease_id;
if (!isset($leasesGrouped[$leaseId])) {
$leasesGrouped[$leaseId] = [
'lease' => $lchek,
'total_security' => 0,
'total_relief' => 0,
'total_utilities' => 0
];
}
if ($lchek->security_deposit_paymentmethod == 'Check') {
$leasesGrouped[$leaseId]['total_security'] += $lchek->security_deposit;
}
// Accumulate relief rental if payment method is "Check"
if ($lchek->relief_rental_paymentmethod == 'Check') {
$leasesGrouped[$leaseId]['total_relief'] += $lchek->relief_rental;
}
// Accumulate utilities if payment method is "Check"
if ($lchek->utilities_paymentmethod == 'Check') {
$leasesGrouped[$leaseId]['total_utilities'] += $lchek->utilities;
}
@endphp
@endforeach
@foreach ($leasesGrouped as $leaseData)
@php
$lease = $leaseData['lease'];
$total = $leaseData['total_security'] + $leaseData['total_relief'] + $leaseData['total_utilities'];
// Only display if there's any non-zero total (i.e., at least one check payment)
if ($total > 0):
@endphp
{{ $lease->client->owners_name }}
{{ $lease->property->property_name }}
{{ $lease->unit->unit_name }} (new)
Bank: {{ $lease->security_deposit_bank }}
Check #: {{ $lease->security_deposit_chckno }}
{{
!empty($lease->relief_rental_chckdate)
? \Carbon\Carbon::parse($lease->security_deposit_chckdate)->format('d-M-y')
: 'N/A'
}}
{{$lease->security_deposit }}
Bank: {{ $lease->relief_rental_bank }}
Check #: {{ $lease->relief_rental_chckno }}
{{
!empty($lease->relief_rental_chckdate)
? \Carbon\Carbon::parse($lease->relief_rental_chckdate)->format('d-M-y')
: 'N/A'
}}
{{$lease->relief_rental }}
Bank: {{ $lease->utilities_bank }}
Check #: {{ $lease->utilities_chckno }}
{{
!empty($lease->relief_rental_chckdate)
? \Carbon\Carbon::parse($lease->utilities_chckdate)->format('d-M-y')
: 'N/A'
}}
{{$lease->utilities }}
@if ($lease->security_deposit_voucher || $lease->relief_rental_voucher || $lease->utilities_voucher)
V#{{ $lease->security_deposit_voucher ?? ($lease->relief_rental_voucher ?? $lease->utilities_voucher) }}
@endif
@php
endif;
@endphp
@endforeach
Prepared By:
___________________________
Name
{{ now()->format('d-M-Y') }}
Checked By:
___________________________
Name