@extends('layouts.app', ['title' => 'Invoice '.$invoice->number]) @section('content') @php($tz = $account->timezone) @php($badge = $invoice->isOverdue() ? 'text-bg-danger' : (['paid' => 'text-bg-success', 'sent' => 'text-bg-warning', 'void' => 'text-bg-dark'][$invoice->status] ?? 'text-bg-secondary')) @php($canManage = auth()->user()->can('payments.manage'))

Invoice {{ $invoice->number }}

{{ $invoice->displayStatus() }}
@if ($canManage && ! in_array($invoice->status, ['paid', 'void'], true)) Edit
@csrf
@endif @if ($canManage) @endif
@error('invoice')
{{ $message }}
@enderror @include('finance.invoices._document', ['public' => false]) @if ($invoice->payments->isNotEmpty())
Payments
@foreach ($invoice->payments as $p)
{{ $p->paid_at->timezone($tz)->format('d M Y, h:i A') }} · {{ $p->gateway === 'manual' ? 'By hand' : ucfirst($p->gateway) }}{{ $p->method ? ' · '.str_replace('_', ' ', $p->method) : '' }} {{ money_full($p->amount, $p->currency) }}@if ((float) $p->refunded_amount > 0) (refunded {{ money_full($p->refunded_amount, $p->currency) }})@endif
@endforeach
@endif @if ($canManage && ! in_array($invoice->status, ['paid', 'void'], true)) @endif @endsection @push('scripts') @endpush