@extends('admin.layout', ['menuKey' => 'orders']) @section('title', 'Order #'.$order->id) @section('content')

Order #{{ $order->id }}

@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))
View receipt Download PDF
@csrf
@endif

Items

@foreach ($order->items as $item) @endforeach
ItemPriceApplied
{{ $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') ?? '–' }}

Money

@forelse ($order->ledger as $l) @empty @endforelse
WhenTypeAmountStripe
{{ $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 }}
Nothing charged.
@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))
@csrf

Refund

@php $maxRefund = $order->kind === 'pack' ? \App\Services\Posting\JobPacks::refundableCents($order) : $order->refundableCents(); @endphp @if ($order->kind === 'bulk')

A bulk upload (CSV): one payment for {{ $order->items->pluck('meta.posting_id')->unique()->count() }} jobs. To refund one job (one we didn't approve, say), enter its share: {{ \App\Support\Pricing::money(\App\Support\Pricing::cents('standard')) }} for a Standard post plus its upgrades.

@endif @if ($order->kind === 'pack')

A job pack: only its unused posts can be refunded (their share of what was charged). The refunded posts come out of the pack.

@endif
@if ($order->posting)@endif

Stripe keeps its processing fee on refunds.

@endif @endsection