@extends('admin.layout') @section('title', 'Account credit') @section('content')
People & money

Account credit

Credit is money off job posts and upgrades for an email address (the poster's email). It's taken off automatically at checkout until it runs out; if a checkout isn't paid, the credit goes back. It isn't paid out as money and doesn't apply to sponsored campaigns.

@include('partials.errors')
@csrf

Give credit

Balances

@if ($balances->isEmpty())

No account credit yet.

@else @foreach ($balances as $b) @endforeach
EmailBalanceLast change
{{ $b->email }}${{ number_format($b->balance / 100, 2) }}{{ \Illuminate\Support\Carbon::parse($b->last_at)->format('M j, Y') }}
@endif

History

@if ($history->isEmpty())

Nothing yet.

@else @foreach ($history as $h) @endforeach
WhenEmailWhatAmountNote
{{ \Illuminate\Support\Carbon::parse($h->created_at)->format('M j, g:i A') }} {{ $h->email }} {{ ['grant' => 'Given', 'use' => 'Used', 'release' => 'Given back'][$h->kind] ?? $h->kind }}@if ($h->order_id) · order #{{ $h->order_id }}@endif {{ $h->amount_cents < 0 ? '−' : '+' }}${{ number_format(abs($h->amount_cents) / 100, 2) }} {{ $h->note }}@if ($h->created_by)
{{ $h->created_by }}@endif
@endif
@endsection