{{ $business_name ?? 'Daily Report' }}

Daily Report

Generated on: {{ now()->format('d/m/Y H:i:s') }}

Report Period: @if(isset($filters)) @if($filters['date_filter'] == 'today') {{ Carbon\Carbon::today()->format('d/m/Y') }} @elseif($filters['date_filter'] == 'yesterday') {{ Carbon\Carbon::yesterday()->format('d/m/Y') }} @elseif($filters['date_filter'] == 'custom' && $filters['start_date'] && $filters['end_date']) {{ \Carbon\Carbon::parse($filters['start_date'])->format('d/m/Y') }} to {{ \Carbon\Carbon::parse($filters['end_date'])->format('d/m/Y') }} @else @endif @else @endif

Transactions Summary

@foreach($transactions as $index => $transaction) @endforeach
# Invoice No Location Date Amount ({{ $currency_symbol ?? 'KES' }}) Added By
{{ $loop->iteration }} {{ $transaction->invoice_no }} {{ $transaction->location_name }} {{ \Carbon\Carbon::parse($transaction->transaction_date)->format('d/m/Y H:i') }} {{ number_format($transaction->final_total, 2) }} {{ $transaction->added_by }}
Total {{ number_format($totalAmount, 2) }}

Payment Summary

@foreach($paymentMethodsFormatted as $method => $amount) @endforeach
Payment Method Amount ({{ $currency_symbol ?? 'KES' }})
{{ $method }} {{ number_format($amount, 2) }}
Total {{ number_format(array_sum($paymentMethodsFormatted), 2) }}

Expense Summary

@foreach($expensesFormatted as $expense) @endforeach
Expense Category Amount ({{ $currency_symbol ?? 'KES' }}) Payment Method
{{ $expense['category_name'] }} {{ number_format($expense['total_expense'], 2) }} {{ $expense['method'] }}
Total {{ number_format(collect($expensesFormatted)->sum('total_expense'), 2) }}

Credit Payments

@foreach($creditPayments as $index => $cp) @php $rawMethod = $cp->method; $method = ucfirst($rawMethod); if (!in_array($method, ['Cash', 'Card', 'Bank Transfer', 'Cheque', 'Other'])) { $method = $customLabels[$rawMethod] ?? ucfirst(str_replace('_', ' ', $rawMethod)); } $customer = $cp->customer_name ?? $cp->supplier_business_name ?? '-'; @endphp @endforeach
# Invoice No Transaction Date Customer Payment Method Amount ({{ $currency_symbol ?? 'KES' }}) Paid On
{{ $loop->iteration }} {{ $cp->invoice_no }} {{ $cp->sell_date?->format('d/m/Y H:i') ?? '-' }} {{ $customer }} {{ $method }} {{ number_format($cp->amount, 2) }} {{ $cp->paid_on?->format('d/m/Y H:i') ?? '-' }}
Total Credit Payments {{ number_format($totalCreditAmount, 2) }}

Money in Hand

@foreach($moneyInHand as $item) @endforeach
Payment Method Total Received ({{ $currency_symbol ?? 'KES' }}) Total Expenses ({{ $currency_symbol ?? 'KES' }}) Amount in Hand ({{ $currency_symbol ?? 'KES' }})
{{ $item['method'] }} {{ number_format($item['payment_amount'], 2) }} {{ number_format($item['expense_amount'], 2) }} {{ number_format($item['remaining_amount'], 2) }}
Total {{ number_format($totalAmountInHand, 2) }}