@extends('layouts.app') @section('content')

Invoices

@if (session('status'))
{{ session('status') }}
@endif
Clear
@foreach($invoices as $i) @endforeach
Invoice # Client Phone Amount Status Created By Date Actions
#{{ $i->id }} {{ $i->client->name }} {{ $i->client->phone ?? 'N/A' }} {{ strtoupper($i->currency) }} {{ number_format($i->amount, 2) }} @if($i->status === 'pending') Pending @elseif($i->status === 'approved') Approved @elseif($i->status === 'rejected') Rejected @elseif($i->status === 'paid') Paid @else {{ ucfirst($i->status) }} @endif {{ optional($i->user)->name ?? 'N/A' }} {{ $i->created_at->format('M d, Y') }}
PDF @if(Auth::user()->isAdmin()) @if($i->status === 'pending')
@csrf
@csrf
@endif @else @if($i->status === 'approved' && $i->status !== 'paid')
@csrf
@endif @endif
@endsection