Daily Collection Report

Generated: {{ isset($generatedAt) ? $generatedAt : date('Y-m-d H:i') }}

@if(isset($dateFrom) && isset($dateTo) && $dateFrom && $dateTo && $dateFrom !== $dateTo) Period: {{ $dateFrom }} to {{ $dateTo }} @elseif(isset($dateFrom) && $dateFrom) Date: {{ $dateFrom }} @endif

{{-- Summary Section --}} @if(isset($summary) && is_array($summary))

Summary

Total Collection Cash Card Other Transactions
{{ isset($summary['total_collection']) ? number_format($summary['total_collection'], 2) : '0.00' }} {{ isset($summary['cash']) ? number_format($summary['cash'], 2) : '0.00' }} {{ isset($summary['card']) ? number_format($summary['card'], 2) : '0.00' }} {{ isset($summary['other']) ? number_format($summary['other'], 2) : '0.00' }} {{ isset($summary['transactions']) ? $summary['transactions'] : 0 }}
@endif {{-- Transactions Table --}} @if(isset($rows) && is_array($rows) && count($rows) > 0)

Transaction Details

@php $total = 0; @endphp @foreach ($rows as $r) @php $total += (float)($r['paid_amount'] ?? 0); @endphp @endforeach
Pay Date Invoice Doctor Patient Procedures Gross Discount Net Paid Method Cashier
{{ $r['pay_date'] ?? '' }} {{ $r['invoice_number'] ?? '' }} {{ $r['doctor'] ?? '' }} {{ $r['patient_name'] ?? '' }} {{ $r['procedures'] ?? '' }} {{ number_format($r['gross'] ?? 0, 2) }} {{ number_format($r['all_discount'] ?? 0, 2) }} {{ number_format($r['net_total'] ?? 0, 2) }} {{ number_format($r['paid_amount'] ?? 0, 2) }} {{ $r['payment_method'] ?? '' }} {{ $r['cashier'] ?? '' }}
PAGE TOTAL: {{ number_format($total, 2) }}
@else

No transactions found for the selected period.

@endif {{-- Payment Methods Summary --}} @if(isset($paymentBreakdown) && is_array($paymentBreakdown) && count($paymentBreakdown) > 0)

Payment Methods Breakdown

@foreach ($paymentBreakdown as $method => $amount) @if(strtolower($method) !== 'advance redeem') @endif @endforeach
Payment Method Amount
{{ strtolower($method) == "advance" ? "Advance" : $method }} {{ number_format($amount, 2) }}
@endif {{-- Doctor-wise Collection --}} @if(isset($doctorWise) && is_array($doctorWise) && count($doctorWise) > 0)

Doctor-wise Collection

@foreach ($doctorWise as $doctor => $amount) @endforeach
Doctor/Nurse Amount
{{ $doctor }} {{ number_format($amount, 2) }}
@endif {{-- User-wise (Cashier-wise) Collection --}} @if(isset($userWise) && is_array($userWise) && count($userWise) > 0)

User-wise Collection

@foreach ($userWise as $user => $amount) @endforeach
User / Cashier Amount
{{ $user }} {{ number_format($amount, 2) }}
@endif {{-- Cash Movement Summary --}} @if(isset($totals) && is_array($totals))

Cash Movement Summary



Collection from Invoice Payments (Non-Advance) {{ number_format($totals['total_without_advance'] ?? 0, 2) }}
Advances Received {{ number_format($totals['total_advance'] ?? 0, 2) }}
TOTAL COLLECTION INFLOW {{ number_format(($totals['total_without_advance'] ?? 0) + ($totals['total_advance'] ?? 0), 2) }}
Paid Out for Refunds -{{ number_format($totals['total_refund'] ?? 0, 2) }}
Total Advance Redeem -{{ number_format($totals['total_advance_used'] ?? 0, 2) }}
@endif {{-- Refund Transactions --}} @if(isset($refunds) && is_array($refunds) && count($refunds) > 0)

Refund Transactions

@php $refundTotal = 0; @endphp @foreach ($refunds as $r) @php $refundTotal += (float)($r['amount'] ?? 0); @endphp @endforeach
Date Invoice Doctor Patient Method Amount Cashier
{{ $r['pay_date'] ?? '' }} {{ $r['invoice_number'] ?? '' }} {{ $r['doctor'] ?? '' }} {{ $r['patient_name'] ?? '' }} {{ $r['payment_method'] ?? '' }} {{ number_format($r['amount'] ?? 0, 2) }} {{ $r['cashier'] ?? '' }}
TOTAL: {{ number_format($refundTotal, 2) }}
@endif {{-- Advance Collection Transactions --}} @if(isset($advances) && is_array($advances) && count($advances) > 0)

Advance Collection Transactions

@php $advanceTotal = 0; @endphp @foreach ($advances as $a) @php $advanceTotal += (float)($a['amount'] ?? 0); @endphp @endforeach
Date Receipt Patient Method Amount Cashier
{{ $a['pay_date'] ?? '' }} {{ $a['advance_id'] ?? '' }} {{ $a['patient_name'] ?? '' }} {{ $a['payment_method'] ?? '' }} {{ number_format($a['amount'] ?? 0, 2) }} {{ $a['cashier'] ?? '' }}
TOTAL: {{ number_format($advanceTotal, 2) }}
@endif