@extends("client.layouts.app") @section("title", __("client.invoices.invoice_prefix", ["id" => $invoice->invoice_num ?? $invoice->id])) @section("content") {{ __('client.invoices.back_to_invoices') }}

{{ __('client.invoices.invoice_prefix', ['id' => $invoice->invoice_num ?? $invoice->id]) }}

{{ __('client.invoices.issued') }} {{ $invoice->date?->format("d M Y") ?? "N/A" }}

{{ __('client.invoices.download_pdf') }} {{ __('client.status.' . strtolower($invoice->status)) }}
{{ __('client.invoices.invoice_details') }}
{{ __('client.invoices.due') }}: {{ $invoice->due_date?->format("d M Y") ?? "N/A" }} @if($invoice->payment_method)  ·  {{ __('client.invoices.paid_via') }} {{ ucwords(str_replace("_", " ", $invoice->payment_method)) }} @endif
@foreach($invoice->items as $item) @endforeach
{{ __('common.table.description') }} {{ __('common.table.amount') }}
{{ $item->description }} ${{ number_format($item->amount, 2) }}
@if($invoice->subtotal && $invoice->subtotal != $invoice->total)
{{ __('client.cart.subtotal') }} ${{ number_format($invoice->subtotal, 2) }}
@endif @if($invoice->tax ?? false)
{{ __('client.cart.tax') }} ${{ number_format($invoice->tax, 2) }}
@endif
{{ __('client.invoices.total_due') }} ${{ number_format($invoice->total, 2) }}
@if(in_array(strtolower($invoice->status), ["unpaid", "overdue"]))
{{ __('client.invoices.pay_this_invoice') }} — ${{ number_format($invoice->total, 2) }}
@if(!empty($gateways))

{{ __('client.invoices.select_payment_method') }}

@foreach($gateways as $i => $gw)
{{ $gatewayLabels[$gw] ?? ucfirst($gw) }}
@endforeach
@foreach($gateways as $i => $gw)
@if(isset($gatewayForms[$gw]) && $gatewayForms[$gw]) {!! $gatewayForms[$gw] !!} @elseif($gw === "stripe")

{{ __('client.invoices.stripe_desc') }}

{{ __('client.invoices.stripe_placeholder') }}
@elseif($gw === "paypal")

{{ __('client.invoices.paypal_desc') }}

@else

{{ __('client.invoices.payment_form_for') }} {{ $gatewayLabels[$gw] ?? ucfirst($gw) }} {{ __('client.invoices.not_configured') }}

@endif
@endforeach @else
{{ __('client.invoices.no_payment_methods') }}
@endif
@endif @section("scripts") @endsection @endsection