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

Expense Details

Edit
@csrf @method('DELETE')
Amount
{{ formatCurrency($expense->amount) }}
@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 }}
Date {{ \Carbon\Carbon::parse($expense->date)->format('d M Y') }}
Category {{ $expense->category->name }}
Paid Through {{ $expense->payment_mode }}
@if($expense->notes)
Notes
{{ $expense->notes }}
@endif
Attached Receipts
@forelse($expense->receipts as $receipt) @php $extension = strtolower(pathinfo($receipt->file_path, PATHINFO_EXTENSION)); $isImage = in_array($extension, ['jpg', 'jpeg', 'png']); @endphp
{{ basename($receipt->file_path) }}
{{ strtoupper($extension) }} File
@if($isImage)
Receipt Preview
@endif @empty
No receipts uploaded for this expense.
@endforelse
Vendor Information
@if($expense->vendor)
{{ $expense->vendor->name }}
{{ $expense->vendor->company_name }}
@else No vendor linked. @endif
Billing Detail
Billable {{ $expense->is_billable ? 'Yes' : 'No' }}
@if($expense->is_billable && $expense->customer)
Billable To
{{ $expense->customer->name }}
View Customer Profile
@endif
Reimbursable {{ $expense->is_reimbursable ? 'Yes' : 'No' }}
@endsection