{{ $company['name'] }}

Email: {{ $company['email'] }}

Phone: {{ $company['phone'] }}

Address: {{ $company['address'] }}

INVOICE

Invoice #: {{ $invoice->invoice_number }}

Date: {{ $invoice->invoice_date->format('M d, Y') }}

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

Status: {{ ucfirst($invoice->status) }}

Bill To:

{{ $invoice->customer->name }}

{{ $invoice->customer->email }}

{{ $invoice->customer->phone }}

{{ $invoice->customer->address }}, {{ $invoice->customer->city }}

Salesman:

{{ $invoice->sale->salesman->name ?? 'N/A' }}

{{ $invoice->sale->salesman->email ?? 'N/A' }}

{{ $invoice->sale->salesman->phone ?? 'N/A' }}

# Description Quantity Price Total
1 {{ $invoice->sale->inventory->deviceModel->name ?? 'GPS Device' }}
Serial: {{ $invoice->sale->inventory->device_serial_number ?? 'N/A' }}
IMEI: {{ $invoice->sale->inventory->imei_number ?? 'N/A' }} @if($invoice->sale->inventory->simCard)
SIM: {{ $invoice->sale->inventory->simCard->sim_number }} @endif
1 {{ $company['currency'] }} {{ number_format($invoice->subtotal, 2) }} {{ $company['currency'] }} {{ number_format($invoice->subtotal, 2) }}
Subtotal: {{ $company['currency'] }} {{ number_format($invoice->subtotal, 2) }}
@if($invoice->tax > 0)
Tax: {{ $company['currency'] }} {{ number_format($invoice->tax, 2) }}
@endif @if($invoice->discount > 0)
Discount: -{{ $company['currency'] }} {{ number_format($invoice->discount, 2) }}
@endif
Total Amount: {{ $company['currency'] }} {{ number_format($invoice->total_amount, 2) }}
@if($invoice->payments->count() > 0)

Payment History

@foreach($invoice->payments as $payment)
{{ $payment->payment_date->format('M d, Y') }} {{ ucfirst($payment->payment_method) }} {{ $company['currency'] }} {{ number_format($payment->amount, 2) }}
@endforeach
Paid Amount: {{ $company['currency'] }} {{ number_format($invoice->paid_amount, 2) }}
Balance Due: {{ $company['currency'] }} {{ number_format($invoice->balance, 2) }}
@endif @if($invoice->notes)

Notes

{{ $invoice->notes }}

@endif