@extends('layouts.app') @section('title', 'Pay invoice') @section('section', 'Checkout') @php $cur = config('payments.currency'); $dp = \App\Payments\Support\Currency::decimals($cur); $fmt = fn ($n) => number_format((float) $n, $dp); $due = (float) $sale->due_amount; $isPaid = $due <= 0; $anyGateway = ($configured['myfatoorah'] ?? false) || ($configured['tap'] ?? false); @endphp @section('content') ← Back

Checkout

{{ $isPaid ? 'Invoice settled' : 'Pay invoice' }}

{{ $sale->invoice_no }}
{{ optional($sale->contact)->name ?? 'Walk-in customer' }} · {{ \Illuminate\Support\Carbon::parse($sale->sale_date)->format('d M Y') }}
@if ($isPaid) Paid @else {{ $sale->paid_amount > 0 ? 'Partly paid' : 'Unpaid' }} @endif

Subtotal{{ $fmt($sale->subtotal) }}
@if ((float) $sale->discount_amount > 0)
Discount−{{ $fmt($sale->discount_amount) }}
@endif
Tax{{ $fmt($sale->tax_amount) }}
Total{{ $fmt($sale->total) }}
@if ((float) $sale->paid_amount > 0)
Paid−{{ $fmt($sale->paid_amount) }}
@endif

{{ $isPaid ? 'Amount paid' : 'Amount due' }}

{{ $cur }}{{ $fmt($isPaid ? $sale->total : $due) }}
@if ($isPaid)

Settled Nothing left to pay on this invoice.

@elseif (! $anyGateway)

No payment method connected

Add your MyFatoorah or Tap keys to start collecting payments.

Connect a gateway
@else
@csrf

Choose how to pay

🔒 You'll continue to the provider's secure page to complete payment. Card details are never entered here.

@endif @endsection