@extends('adminlte::page')
@section('title', 'All Invoices')
@section('content_header')
@if(session('success'))
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
{{-- Summary small boxes --}}
@php
$statusColors = [
'pending' => 'warning',
'approved_by_do' => 'info',
'rejected_by_do' => 'danger',
'paid' => 'success',
];
@endphp
@foreach(['pending','approved_by_do','rejected_by_do','paid'] as $status)
{{ \App\Models\Invoice::where('status', $status)->count() }}
{{ ucfirst(str_replace('_',' ',$status)) }}
@endforeach
{{-- Table --}}
| # |
Budget Item |
Budget |
Amount (TZS) |
Status |
Approved By |
Paid By |
Actions |
@foreach($invoices as $invoice)
| {{ $loop->iteration }} |
{{ $invoice->budgetItem->item ?? '-' }} |
#{{ $invoice->budgetItem->budget->id ?? '-' }} |
{{ number_format($invoice->amount, 2) }} |
{{ ucfirst(str_replace('_',' ',$invoice->status)) }}
|
{{ $invoice->approvedBy->name ?? '-' }} |
{{ optional($invoice->paidBy)->name ?? '-' }} |
View
|
@endforeach
{{ $invoices->links() }}
@stop