@extends('layouts.app', ['title' => 'Payments']) @section('content') @php($canManage = auth()->user()->can('payments.manage'))

Payments

Money received online or recorded by hand, with refunds.

@error('refund')
{{ $message }}
@enderror
@if ($payments->isEmpty())
No payments yet.
@else
@foreach ($payments as $p) @endforeach
DateCustomerForMethodAmountRefunded
{{ $p->paid_at->timezone($currentAccount->timezone)->format('d M Y, h:i A') }} @if ($p->contact){{ $p->contact->full_name }}@else — @endif @if ($p->invoice){{ $p->invoice->number }}@endif {{ $p->order?->description }} {{ $p->gateway === 'manual' ? 'By hand' : ucfirst($p->gateway) }}{{ $p->method ? ' · '.str_replace('_', ' ', $p->method) : '' }}@if ($p->gateway_payment_id)
{{ $p->gateway_payment_id }}
@endif
{{ money_full($p->amount, $p->currency) }} {{ (float) $p->refunded_amount > 0 ? money_full($p->refunded_amount, $p->currency) : '—' }} @if ($canManage && $p->refundable() > 0) @endif
{{ $payments->links() }}
@endif
@endsection @push('scripts') @endpush