@extends('layouts.app') @section('title', $invoice->number) @section('page-title', $invoice->number) @section('page-subtitle', $invoice->tenant?->name.' — '.$invoice->period_start->format('F Y')) @section('content') @php $gateways = app(\App\Services\Payments\PaymentGatewayService::class); $stripeOn = $gateways->isEnabled(\App\Models\Transaction::GATEWAY_STRIPE); $paypalOn = $gateways->isEnabled(\App\Models\Transaction::GATEWAY_PAYPAL); $payable = $invoice->status === 'issued' && (float) $invoice->total > 0; $qrSvc = app(\App\Services\InvoiceQrService::class); $qrUrl = $qrSvc->urlFor($invoice); $qrSvg = $qrSvc->svg($invoice, 200); @endphp @if(session('status'))
{{ session('status') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif
← {{ __('All invoices') }} {{ __('Download PDF') }} @if($payable && $stripeOn) {{ __('Pay with Stripe') }} @endif @if($payable && $paypalOn) {{ __('Pay with PayPal') }} @endif @if($invoice->status === 'issued')
@csrf
@endif @if($invoice->status !== 'void')
@csrf
@endif
@if($payable && ! $stripeOn && ! $paypalOn)
{{ __('No payment gateway enabled. Configure Stripe or PayPal in') }} {{ __('Payment gateways') }}.
@endif
{{ __('Number') }}
{{ $invoice->number }}
{{ __('Period') }}
{{ $invoice->period_start->format('Y-m-d') }} → {{ $invoice->period_end->format('Y-m-d') }}
{{ __('Issued') }}
{{ $invoice->issued_at?->format('Y-m-d') ?? '—' }}
{{ __('Status') }}
{{ ucfirst($invoice->status) }}
@foreach($invoice->lines as $line) @endforeach @if((float)$invoice->discount > 0) @endif
{{ __('Description') }} {{ __('Qty') }} {{ __('Unit') }} {{ __('Amount') }}
{{ $line->description }} {{ $line->quantity }} {{ number_format((float)$line->unit_amount, 2) }} {{ number_format((float)$line->amount, 2) }}
{{ __('Subtotal') }}{{ number_format((float)$invoice->subtotal, 2) }} {{ $invoice->currency }}
{{ __('Free allowance') }}-{{ number_format((float)$invoice->discount, 2) }}
{{ __('VAT') }} ({{ rtrim(rtrim(number_format((float)$invoice->vat_rate,2),'0'),'.') }}%){{ number_format((float)$invoice->vat_amount, 2) }}
{{ __('Total') }}{{ number_format((float)$invoice->total, 2) }} {{ $invoice->currency }}
@if($invoice->reverse_charge)

{{ __('VAT reverse-charged — Article 21 §2 of Belgian VAT Code (intra-EU B2B).') }}

@endif
{{-- Pay-by-QR card --}}
{!! $qrSvg !!}

{{ __('Pay by QR') }}

{{ __('Scan with a phone camera to open the secure payment page for invoice :n.', ['n' => $invoice->number]) }}

@if(str_starts_with($qrUrl, 'http')) {{ __('Open payment page') }} → @endif {{ $qrUrl }}
@if(! $stripeOn && ! $paypalOn)

{{ __('No payment gateway is enabled — the QR encodes the invoice reference for manual transfer. Configure Stripe or PayPal for online payment.') }}

@endif
@endsection