@extends(backpack_view('blank')) @section('content')

Invoice History

@if(count($invoices))
@foreach($invoices as $invoice) @php $tax = 0; if (!empty($invoice->total_tax_amounts)) { foreach ($invoice->total_tax_amounts as $taxAmount) { $tax += $taxAmount->amount; } } $periodStart = null; $periodEnd = null; if (!empty($invoice->lines->data)) { $line = $invoice->lines->data[0]; $periodStart = $line->period->start ?? null; $periodEnd = $line->period->end ?? null; } @endphp @endforeach
Invoice # Billing Period Date Status Subtotal GST / Tax Total Actions
{{ $invoice->number ?? '-' }} @if($periodStart && $periodEnd) {{ \Carbon\Carbon::createFromTimestamp($periodStart)->format('d M Y') }}
to {{ \Carbon\Carbon::createFromTimestamp($periodEnd)->format('d M Y') }} @else - @endif
{{ \Carbon\Carbon::createFromTimestamp($invoice->created)->format('d M Y') }} @switch($invoice->status) @case('paid') Paid @break @case('open') Open @break @case('draft') Draft @break @case('void') Void @break @default {{ ucfirst($invoice->status) }} @endswitch ${{ number_format($invoice->subtotal / 100, 2) }} {{ strtoupper($invoice->currency) }} ${{ number_format($tax / 100, 2) }} {{ strtoupper($invoice->currency) }} ${{ number_format($invoice->total / 100, 2) }} {{ strtoupper($invoice->currency) }} @if($invoice->hosted_invoice_url) View @endif
@else
No invoices found.
@endif
@endsection