@php($canCreateExpense = \App\Support\AdminAccess::canAction('expenses', 'create')) @php($canEditExpense = \App\Support\AdminAccess::canAction('expenses', 'edit')) @php($canDeleteExpense = \App\Support\AdminAccess::canAction('expenses', 'delete')) @php($canCreateExpenseCategory = \App\Support\AdminAccess::canAction('categories', 'create'))

{{ __('Expenses Management') }}

{{ __('Track paid and pending expenses with linked categories and accounts.') }}

@if($canCreateExpense) @endif
@forelse($expenses as $expense) @empty @endforelse
{{ __('Expense') }} {{ __('Amount') }} {{ __('Expense Date') }} {{ __('Account') }} {{ __('Status') }} {{ __('Actions') }}
{{ $expense->title }}
{{ $expense->category?->display_name ?? $expense->category?->name ?? __('No category') }}
@if($expense->description)
{{ $expense->description }}
@endif
{{ __('Rs.') }} {{ number_format((float) $expense->amount, 2) }}
{{ $expense->expense_date?->format('d M Y') ?? '-' }}
{{ __('Payment Date') }}: {{ $expense->payment_date?->format('d M Y') ?? '-' }}
{{ __('Due Date') }}: {{ $expense->due_date?->format('d M Y') ?? '-' }}
{{ $expense->account?->account_name ?? '-' }}
{{ __('Method') }}: {{ $expense->payment_method ?: '-' }}
{{ $expense->payment_status === 'paid' ? __('Paid') : __('Pending') }}
@if($expense->receipt) @endif @if($canEditExpense) @endif @if($canDeleteExpense) @endif
{{ __('No expenses found yet.') }}
@if($expenses->hasPages()) @endif
@if($showExpenseModal) @endif @if($showCategoryModal)
{{ __('Add New Category') }}
@error('new_category_name') {{ $message }} @enderror
@endif