@extends('layouts.app') @section('content') @include('proedge.admin.discounts._styles') @php $hasFilters = request()->hasAny(['keyword', 'offer_id', 'from', 'to']); @endphp
| Offer | Partner | @include('proedge.admin.discounts._th', ['field' => 'user_id', 'label' => 'User'])Applied to | @include('proedge.admin.discounts._th', ['field' => 'amount_discounted', 'label' => 'Discount'])||||
|---|---|---|---|---|---|---|
| {{ $r->redeemed_at ? $r->redeemed_at->format('d M Y H:i') : '—' }} |
@if($r->code)
{{ $r->code }}
@else
{{-- An offer given straight to a customer, or a coupon
applied in the Stripe Dashboard. --}}
given directly
@endif
|
{{ data_get($r->rule_snapshot, 'name', optional($r->offer)->name) ?: '—' }} | {{ data_get($r->rule_snapshot, 'partner') ?: '—' }} | {{ optional($r->user)->name ?: 'Unknown' }} #{{ $r->user_id }} | {{ str_replace('_', ' ', $r->redeemable_type) }} #{{ $r->redeemable_id }} | @if(! $r->gateway_invoice_id && (float) $r->amount_discounted === 0.0) {{-- Applied to a customer but not billed yet; the first invoice carrying it fills the amount in. --}} awaiting first invoice @else {{ strtoupper($r->currency) }} {{ number_format((float) $r->amount_discounted, 2) }} @endif |
| @if($hasFilters) No redemptions match those filters. @else Nothing redeemed yet. Redemptions are recorded once checkout can accept codes. @endif | ||||||