@extends('layouts.master') @section('page_title', 'Expenditure Report') @section('content')
Period: {{ Carbon\Carbon::parse($startDate)->format('M d, Y') }} - {{ Carbon\Carbon::parse($endDate)->format('M d, Y') }}
Generated: {{ Carbon\Carbon::now()->format('M d, Y g:i A') }}
Total Transactions: {{ $expenditures->count() }}
Total Expenditure
Average Transaction
Categories Used
Largest Transaction
| Category | Transactions | Total Amount | Average | Percentage |
|---|---|---|---|---|
| {{ $summary->category_name }} | {{ $summary->transaction_count }} | ${{ number_format($summary->total_amount, 2) }} | ${{ number_format($summary->avg_amount, 2) }} | {{ number_format($percentage, 1) }}% |
| Total | {{ $expenditures->count() }} | ${{ number_format($totalExpenditure, 2) }} | ${{ number_format($expenditures->avg('amount'), 2) }} | 100.0% |
| Month | Transactions | Total Amount | Change from Previous |
|---|---|---|---|
| {{ $trend->month_name }} | {{ $trend->transaction_count }} | ${{ number_format($trend->total_amount, 2) }} | @if($previousAmount > 0) {{ $change > 0 ? '+' : '' }}{{ number_format($change, 1) }}% @else - @endif |
| Date | Voucher # | Description | Category | Vendor | Amount | Payment Method | Status |
|---|---|---|---|---|---|---|---|
| {{ Carbon\Carbon::parse($expenditure->voucher_date)->format('M d, Y') }} | {{ $expenditure->voucher_number }} |
{{ str($expenditure->description)->limit(40) }} | {{ $expenditure->category_name ?? 'Uncategorized' }} | {{ $expenditure->vendor_name }} | ${{ number_format($expenditure->amount, 2) }} | {{ $expenditure->payment_method ?? 'N/A' }} | {{ $expenditure->status ?? 'Unknown' }} |
| Grand Total | ${{ number_format($expenditures->sum('amount'), 2) }} | ||||||