@extends('layouts.candidate') @section('title', 'Invoice Details - M-Ajira') @section('content')

{{ $invoice->invoice_number }}

{{ $invoice->demand->job_title }} - {{ $invoice->demand->country }}

{{ ucfirst($invoice->status) }}
@if(session('success'))
✅

Success!

{{ session('success') }}

@endif

đŸ’ĩ Commission Payment

â„šī¸

What's Included:

This commission covers visa processing fees and flight ticket costs. Your passport, medical certificate, and attestation fees were paid separately.

Commission Amount

Visa Processing + Flight Ticket

âœˆī¸
TOTAL DUE

{{ number_format($invoice->commission_amount) }}

KES

💱 Foreign Currency Equivalent

Total Amount

{{ $invoice->foreign_currency }} {{ number_format($invoice->total_foreign_amount, 2) }}

Exchange Rate

1 {{ $invoice->foreign_currency }} = KES {{ number_format($invoice->exchange_rate, 2) }}

Monthly Salary

{{ $invoice->foreign_currency }} {{ number_format($invoice->monthly_salary_foreign, 2) }}

💡 This commission equals {{ $invoice->salary_months_equivalent }} months of your salary

@if($invoice->payment)

✅ Cash Payment Submitted

Amount: KES {{ number_format($invoice->payment->amount_paid) }}
Method: {{ $invoice->payment->payment_method }}
Reference: {{ $invoice->payment->transaction_reference }}
Date: {{ $invoice->payment->transaction_date->format('d M Y') }}
Status: {{ ucfirst($invoice->payment->status) }}
@elseif($invoice->financingAgreement)

đŸ’ŗ Financing Agreement

Financier: {{ $invoice->financingAgreement->financier->name }}
Loan Amount: KES {{ number_format($invoice->financingAgreement->total_payable) }}
Monthly Deduction: KES {{ number_format($invoice->financingAgreement->monthly_deduction) }}
Duration: {{ $invoice->financingAgreement->deduction_months }} months
Status: {{ ucfirst($invoice->financingAgreement->status) }}
đŸ“Ĩ Download Loan Agreement
@endif

📄 Invoice Document

đŸ“Ĩ Download PDF

Official invoice document

@if($invoice->status === 'pending' && !$invoice->payment && !$invoice->financingAgreement)

💰 Payment Options

@if($candidate->needs_financing)
@csrf
@endif

â„šī¸ Choose your preferred payment method to proceed

@endif
@endsection