@extends('admin.layout', ['menuKey' => 'orders'])
@section('title', 'Order #'.$order->id)
@section('content')
@include('partials.errors')
- Status
- {{ str_replace('_', ' ', $order->status) }}
- Email
- {{ $order->email }}
- Kind
- {{ str_replace('_', ' ', $order->kind) }}
- Post
- @if ($order->posting)#{{ $order->posting_id }} {{ $order->posting->title }} ({{ $order->posting->status }})@else – @endif
- Amount
- {{ $order->dollars() }}@if ($order->tax_cents) + {{ $order->dollars($order->tax_cents) }} tax @endif
@if ($order->credit_cents)- Account credit used
- {{ $order->dollars((int) $order->credit_cents) }} (charged to the card: {{ $order->dollars($order->chargedCents()) }})
@endif
- Refunded
- {{ $order->dollars($order->refunded_cents) }}
- Paid
- {{ $order->paid_at?->format('M j, Y g:i A') ?? 'Not paid' }}
- Stripe
- {{ $order->stripe_payment_intent ?? $order->stripe_session_id ?? '–' }}
- Environment
- {{ $order->env }}
@if ($order->receipt_no)
- Receipt
- {{ $order->receipt_no }}
- Paid with
- {{ \App\Services\Receipts::method($order) }}
- Receipt emailed
- {{ $order->receipt_sent_at?->format('M j, Y g:i A') ?? 'Not yet' }}
@endif
@if ($order->receipt_no && in_array($order->status, \App\Services\Receipts::RECEIPTED, true))
@endif
Items
| Item | Price | Applied |
@foreach ($order->items as $item)
{{ $item->name }}@if ($item->item === 'website_link' && isset($item->meta['url'])) {{ $item->meta['url'] }}@endif | {{ $order->dollars($item->amount_cents) }} | {{ $item->applied_at?->format('M j, g:i A') ?? '–' }} |
@endforeach
Money
| When | Type | Amount | Stripe |
@forelse ($order->ledger as $l)
| {{ $l->created_at?->format('M j, g:i A') }} | {{ $l->type }} | {{ ($l->amount_cents < 0 ? '−' : '').'$'.number_format(abs($l->amount_cents) / 100, 2) }} | {{ $l->stripe_ref }} |
@empty
| Nothing charged. |
@endforelse
@if ($order->kind === 'sponsor')
@php $sc = \App\Models\Campaign::query()->where('order_id', $order->id)->first(); @endphp
Sponsored campaign budget.@if ($sc) Open the campaign: stopping it refunds what wasn't spent.@endif
@elseif ($order->refundableCents() > 0 && in_array($order->status, ['paid', 'partially_refunded'], true))
@endif
@endsection