@php($fmtCoins = fn ($value) => number_format((float) $value, 2))
@if ($canManage) Open last week @endif @include('livewire.admin.ads._nav') @error('batch'){{ $message }}@enderror BatchWeek ({{ $timezone }})StatusRevenueUnitsPlayersAllocatedCredited @forelse ($batches as $row) $selected?->id === $row->id])> #{{ $row->id }} {{ $row->period_start->setTimezone($timezone)->format('d M H:i') }} – {{ $row->period_end->setTimezone($timezone)->format('d M Y H:i') }} {{ ucfirst($row->status) }} ${{ number_format((float) $row->eligible_revenue_usd, 4) }} {{ number_format($row->total_units) }} {{ number_format($row->eligible_users) }} {{ $fmtCoins($row->total_coins_allocated) }} {{ $fmtCoins($row->total_coins_credited) }} View @empty @endforelse {{ $batches->links() }} @if ($selected)
{{ ucfirst($selected->status) }} ${{ number_format((float) $revenue, 6) }} @if ((float) $revenue <= 0)— none finalized yet@endif ${{ number_format((float) $selected->eligible_revenue_usd, 6) }} {{ $selected->business_share_pct }}% · ${{ number_format((float) $selected->business_share_usd, 6) }} {{ $selected->user_share_pct }}% · ${{ number_format((float) $selected->user_pool_usd, 6) }} {{ $selected->usd_inr_rate ? $selected->usd_inr_rate.' ('.$selected->rate_source.', '.$selected->rate_at?->format('d M Y H:i').')' : '—' }} INR {{ number_format((float) $selected->user_pool_inr, 4) }} {{ $selected->coins_per_inr }} {{ number_format($selected->total_units) }} / {{ number_format($selected->eligible_users) }} {{ $fmtCoins($selected->total_coins_allocated) }} / {{ $fmtCoins($selected->total_coins_credited) }} coins {{ number_format((float) $selected->remainder_coins, 4) }} coins — recorded, not paid {{ $selected->calculated_at?->format('d M Y H:i') ?? '—' }} / {{ $selected->completed_at?->format('d M Y H:i') ?? '—' }}
@if ($selected->revenue_sources)

Finalized revenue reports used

    @foreach ($selected->revenue_sources as $source)
  • #{{ $source['id'] }} · {{ $source['period_start'] }} – {{ $source['period_end'] }} · {{ ucfirst($source['provider']) }} · ${{ number_format((float) $source['revenue_usd'], 6) }} · {{ $source['source'] }}
  • @endforeach
@endif @if ($canManage && in_array($selected->status, ['pending', 'calculated'], true))
{{ $selected->status === 'calculated' ? 'Recalculate' : 'Calculate' }}
@endif @if ($canManage && in_array($selected->status, ['calculated', 'crediting', 'failed'], true))

{{ $selected->status === 'failed' ? 'Some credits failed. Retrying credits only what is still owed.' : 'Credits every payable allocation to each player\'s Deposit balance through the wallet ledger.' }}

{{ $selected->status === 'failed' ? 'Retry failed credits' : 'Credit settlement' }}
@endif
@if ($adjustingId) @php($adjusting = $allocations->firstWhere('id', $adjustingId))

Adjust {{ $adjusting?->user?->username ?? 'allocation #'.$adjustingId }}'s credited share. This records a separate, audited correction with its own ledger entry — the settlement itself is not changed. The player sees the reason in their history.

Cancel Record
@endif PlayerUnitsCoinsStatusLedger refCreditedAdjustmentsNote@if ($canManage && $selected->status === 'completed')@endif @forelse ($allocations as $allocation) {{ $allocation->user?->username ?? '#'.$allocation->user_id }} {{ number_format($allocation->units) }} {{ $fmtCoins($allocation->coins) }} {{ ucfirst(str_replace('_', ' ', $allocation->status)) }} {{ $allocation->wallet_ledger_entry_id ? 'L'.$allocation->wallet_ledger_entry_id : '—' }} {{ $allocation->credited_at?->format('d M Y H:i') ?? '—' }} @if ($allocation->adjustments->isNotEmpty()) {{ $fmtCoins($allocation->adjustments->sum('coins')) }} @else — @endif {{ $allocation->failure_reason ?? ($allocation->attempts > 1 ? $allocation->attempts.' attempts' : '') }} @if ($canManage && $selected->status === 'completed') @if ($allocation->status === 'credited')Adjust@endif @endif @empty @endforelse {{ $allocations->links() }} @endif