@extends('layouts.admin') @section('title', 'Invoice ' . $invoice->invoice_number) @section('page-title', 'Invoice Details') @section('content')
arrow_back Back to Invoices

Invoice {{ $invoice->invoice_number }}

@php $statusConfig = [ 'draft' => ['label' => 'Draft', 'bg' => 'bg-gray-100', 'text' => 'text-gray-800'], 'partial' => ['label' => 'Partially Paid', 'bg' => 'bg-blue-100', 'text' => 'text-blue-800'], 'paid' => ['label' => 'Paid', 'bg' => 'bg-green-100', 'text' => 'text-green-800'], 'sent' => ['label' => 'Sent', 'bg' => 'bg-blue-100', 'text' => 'text-blue-800'], 'viewed' => ['label' => 'Viewed', 'bg' => 'bg-purple-100', 'text' => 'text-purple-800'], 'unpaid' => ['label' => 'Unpaid', 'bg' => 'bg-yellow-100', 'text' => 'text-yellow-800'], 'overdue' => ['label' => 'Overdue', 'bg' => 'bg-red-100', 'text' => 'text-red-800'], ]; $status = $invoice->status === 'partial' ? 'partial' : ($invoice->balance == 0 && $invoice->status !== 'draft' && $invoice->status !== 'sent' && $invoice->status !== 'viewed' ? 'paid' : ($invoice->balance > 0 && $invoice->status === 'sent' ? 'unpaid' : $invoice->status)); $config = $statusConfig[$status] ?? $statusConfig['draft']; @endphp {{ $config['label'] }} • {{ $invoice->created_at->format('M d, Y') }}

settings

edit Edit @if(!$isFullyPaid) @endif download Download Invoice @if(isset($whatsappConfig) && $whatsappConfig && $whatsappConfig->is_active) @endif
@if(isset($whatsappConfig) && $whatsappConfig && $whatsappConfig->is_active) @endif @endsection