@extends('admin.layouts.app') @php $pageTitle = $pageTitle ?? 'Income Overrides'; $periodLabel = [ 'today' => 'Today', 'yesterday' => 'Yesterday', 'last7days' => 'Last 7 Days', 'last30days' => 'Last 30 Days', 'lastyear' => 'Last 1 Year', 'total' => 'Total Lifetime', ]; @endphp @section('panel') @if(session('success'))
{{ session('success') }}
@endif @if(session('notify')) @foreach(session('notify') as $n) @php $type = $n[0] ?? 'info'; $msg = $n[1] ?? ''; $cls = $type === 'success' ? 'alert--success' : ($type === 'error' ? 'alert--danger' : 'alert--info'); @endphp
{{ $msg }}
@endforeach @endif
@if(empty($items) || count($items) === 0)
No income overrides found

Click “Add New” to create your first override.

Add New
@else
@foreach($items as $it) @php $amt = (float) $it->amount; $applied = (float) ($it->applied_amount ?? 0); $userName = $it->user->fullname ?? $it->user->username ?? $it->user->name ?? ('User#'.$it->user_id); $refCode = $it->user->referral_code ?? '-'; $p = $it->period ?? ''; $pText = $periodLabel[$p] ?? strtoupper($p); @endphp @endforeach
User Referral Code Period Amount Balance Note Updated Action
{{ $userName }}
ID: {{ $it->user_id }}
{{ $refCode }} {{ $pText }} {{ number_format($amt, 2) }} @if($applied > 0) Added
{{ number_format($applied, 2) }} @else No @endif
{{ $it->note ?? '-' }} {{ $it->updated_at?->format('d M Y, h:i A') }}
Edit
@csrf @method('DELETE')
@if(method_exists($items,'links'))
{{ $items->links() }}
@endif @endif
@endsection @push('breadcrumb-plugins') Add New @endpush