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

Invoice {{ $invoice->invoice_number }}

@php $statusColors = [ 'draft' => 'bg-gray-100 text-gray-700', 'sent' => 'bg-blue-100 text-blue-700', 'paid' => 'bg-green-100 text-green-700', 'overdue' => 'bg-red-100 text-red-700', 'cancelled' => 'bg-yellow-100 text-yellow-700', ]; @endphp {{ ucfirst($invoice->status) }}
@if($invoice->status === 'draft' && auth()->user()->hasPermission($currentBusiness->id, 'can_edit_invoices'))
@csrf
@endif

INVOICE

{{ $invoice->invoice_number }}

{{ $currentBusiness->name }}

@if($currentBusiness->address)

{{ $currentBusiness->address }}

@endif @if($currentBusiness->company_email)

{{ $currentBusiness->company_email }}

@endif @if($currentBusiness->phone)

{{ $currentBusiness->phone }}

@endif

Bill To

{{ $invoice->client_name }}

@if($invoice->client_email)

{{ $invoice->client_email }}

@endif @if($invoice->client_address)

{{ $invoice->client_address }}

@endif

Issue Date: {{ $invoice->issue_date->format('d M Y') }}

Due Date: {{ $invoice->due_date->format('d M Y') }}

@foreach($invoice->items as $item) @endforeach
Description Qty Unit Price Total
{{ $item->description }} {{ $item->quantity }} {{ $currentBusiness->currency_symbol }}{{ number_format($item->unit_price, 2) }} {{ $currentBusiness->currency_symbol }}{{ number_format($item->quantity * $item->unit_price, 2) }}
Subtotal {{ $currentBusiness->currency_symbol }}{{ number_format($invoice->subtotal, 2) }}
@if($invoice->tax_amount > 0)
Tax {{ $currentBusiness->currency_symbol }}{{ number_format($invoice->tax_amount, 2) }}
@endif @if($invoice->discount > 0)
Discount -{{ $currentBusiness->currency_symbol }}{{ number_format($invoice->discount, 2) }}
@endif
Total {{ $currentBusiness->currency_symbol }}{{ number_format($invoice->total, 2) }}
@if($invoice->notes)

Notes

{{ $invoice->notes }}

@endif
@endsection