@extends('layouts.app') @section('title', 'Expenses') @section('content')

Expenses

Record New Expense
@if(session('success')) @endif
@if(request()->anyFilled(['status', 'category_id'])) @endif
@forelse($expenses as $expense) @empty @endforelse
Date Category Vendor Amount Payment Mode Status Receipt Actions
{{ \Carbon\Carbon::parse($expense->date)->format('d M Y') }} {{ $expense->category->name }} {{ $expense->vendor ? $expense->vendor->name : 'N/A' }} {{ formatCurrency($expense->amount) }} {{ $expense->payment_mode }} @php $badgeClass = [ 'unbilled' => 'bg-light-warning text-warning', 'invoiced' => 'bg-light-success text-success', 'reimbursed' => 'bg-light-info text-info' ][$expense->status] ?? 'bg-light-secondary text-secondary'; @endphp {{ $expense->status }} @if($expense->receipts->count() > 0) @else - @endif
No expenses found. Record your first expense.
{{ $expenses->appends(request()->query())->links() }}
@endsection