@extends('layouts.app') @section('title', 'Invoice ' . $invoice->invoice_number) @push('styles') @endpush @section('content')
{{-- Action Bar --}}
← Dashboard @if(auth()->user()->role !== 'applicant') + New Invoice @endif
@php $statusClass = match($invoice->status ?? 'pending') { 'paid' => 'status-paid', 'overdue' => 'status-overdue', 'cancelled' => 'status-cancelled', default => 'status-pending', }; @endphp ● {{ ucfirst($invoice->status ?? 'pending') }}
{{-- Invoice Document --}}
{{-- Letterhead --}}

Government of Kiribati

Ministry of Fisheries & Ocean Resources

P. O. Box 64, BAIRIKI, TARAWA

Telephone Number: 75021099 / 75021075

E-mail: info@mfor.gov.ki  |  Website: https://www.mfor.gov.ki

Local Fish Licensing System

{{-- To / Invoice Ref --}} @php $app = $invoice->application; $dueDate = $invoice->due_date ? \Carbon\Carbon::parse($invoice->due_date) : null; @endphp
To: {{ $app->cd_business_name ?? $app->cd_registered_name ?? $app->business_name ?? '—' }}
Address: {{ $app->cd_main_branch_address ?? '—' }}
Email address: {{ $app->cd_email_address ?? '—' }}
@if($app->cd_telephone_number ?? null)
Tel: {{ $app->cd_telephone_number }}
@endif @if($app->cd_registration_number ?? null)
Reg. No: {{ $app->cd_registration_number }}
@endif
Invoice #: {{ $invoice->invoice_number }}
@if($dueDate) @else @endif @if($invoice->paid_at) @endif
Issued:{{ \Carbon\Carbon::parse($invoice->created_at)->format('d M Y') }}
Status:{{ ucfirst($invoice->status ?? 'Pending') }}
Due Date:{{ $dueDate->format('d M Y') }}
Due Date:Not set
Paid On:{{ \Carbon\Carbon::parse($invoice->paid_at)->format('d M Y') }}
{{-- License Details Strip --}}
License Type: {{ collect(explode('-', $invoice->company_type))->map(fn($w) => ucfirst($w))->implode('-') }} Company Duration: {{ $invoice->license_duration === '12months' ? '12 Months' : '6 Months' }} @if($invoice->vesselSize) Vessel Size: {{ $invoice->vesselSize->label }} @endif Applicant: {{ $app->ap_full_name ?? '—' }} @if($app->ap_phone_number ?? null) Contact: {{ $app->ap_phone_number }} @endif
{{-- Fee Breakdown --}}
@php $rows = [ ['Upfront License Fee', 'Fixed Fee', $invoice->upfront_fee], ['Environmental Impact (EIA)', 'Fixed Fee', $invoice->eia_fee], ['Registration Fee', 'Fixed Fee', $invoice->registration_fee], ['Cost Recovery Fee', 'Fixed Fee', $invoice->recovery_fee], ['Vessel Size Fee', 'Vessel', $invoice->vessel_fee], ]; @endphp @foreach ($rows as [$desc, $cat, $amount]) @endforeach {{-- Harvesting Methods --}} @if ($invoice->harvestingMethods->count()) @foreach ($invoice->harvestingMethods as $method) @php $mFee = $method->pivot->fee ?? null; @endphp @endforeach @else @endif {{-- Fish Families --}} @if ($invoice->fishFamilies->count()) @foreach ($invoice->fishFamilies as $ff) @php $ffFee = $ff->pivot->fee ?? null; @endphp @endforeach @else @endif
Description Category Amount (AUD)
{{ $desc }} {{ $cat }} !$amount])> {{ $amount ? '$'.number_format($amount, 2) : '—' }}
Harvesting Methods
@if($method->name === 'Others' && !empty($invoice->other_harvesting_methods)) Others ({{ implode(', ', $invoice->other_harvesting_methods) }}) × {{ count($invoice->other_harvesting_methods) }} @else {{ $method->name }} @endif Harvesting Method !$mFee])> {{ $mFee ? '$'.number_format($mFee, 2) : '—' }}
Harvesting Methods Fee Harvesting Method !$invoice->harvesting_fee])> {{ $invoice->harvesting_fee ? '$'.number_format($invoice->harvesting_fee, 2) : '—' }}
Target Fish Families
@if($ff->name === 'Others' && !empty($invoice->other_fish_families)) Others ({{ implode(', ', $invoice->other_fish_families) }}) × {{ count($invoice->other_fish_families) }} @else {{ $ff->name }} @endif Target Species !$ffFee])> {{ $ffFee ? '$'.number_format($ffFee, 2) : '—' }}
Fish Families Fee Target Species !$invoice->fish_family_fee])> {{ $invoice->fish_family_fee ? '$'.number_format($invoice->fish_family_fee, 2) : '—' }}
TOTAL AMOUNT DUE ${{ number_format($invoice->total_amount, 2) }}
{{-- Notes --}} @if ($invoice->notes)
Notes / Special Instructions {{ $invoice->notes }}
@endif {{-- Bank Details --}}

Bank Details:

Kiribati Government No.1

Account No: 268253

BSB No: 018970

Swift Code: BKIRKIKI

Bank Name: ANZ Bank (Kiribati) Ltd

Address: Bairiki, Tarawa

Coding Block for Local Fishing License.

1303/110101/00000/91/142241/042

{{-- /.invoice-inner --}} {{-- Footer --}}
{{-- /.invoice-doc --}}
@endsection