@extends('layouts.admin.base') @section('page-title') Duplicate Payouts @endsection @section('content')

Duplicate Investment Payouts

Showing investment {{ $page }} of {{ $totalInvestments }} @if($totalInvestments > 0) | Found {{ count($duplicates) }} duplicate group(s) for this investment @endif

Selected: 0
@if($totalInvestments > 1)
@if($page > 1) Previous Investment @endif
Investment {{ $page }} / {{ $totalInvestments }}
@if($page < $totalInvestments) Next Investment @endif
@endif @if(count($duplicates) > 0)
@csrf
(Deletable = all except the first payout in each group)
@foreach($duplicates as $index => $duplicate)
{{ $duplicate['investment']->user->name ?? 'N/A' }}
Investment ID: {{ $duplicate['investment']->id }} | Plan: {{ $duplicate['investment']->plan->name ?? 'N/A' }} | Amount: {{ formatMoney($duplicate['investment']->amount) }}
{{ $duplicate['count'] }} Duplicates

Payout Amount: {{ formatMoney($duplicate['amount']) }} | Payout Date: {{ \Carbon\Carbon::parse($duplicate['pay_date'])->format('F d, Y') }}

@foreach($duplicate['payouts'] as $payoutIndex => $payout) @endforeach
Select Payout ID Capital Created At Pay At Status
@if($payoutIndex > 0) @else Keep @endif {{ $payout->id }} {{ formatMoney($payout->capital) }} {{ \Carbon\Carbon::parse($payout->created_at)->format('M d, Y H:i') }} {{ \Carbon\Carbon::parse($payout->pay_at)->format('M d, Y H:i') }} @php $statusBadge = ''; switch($payout->status) { case 1: $statusBadge = 'bg-success'; $statusText = 'Paid'; break; case 0: $statusBadge = 'bg-warning'; $statusText = 'Unpaid'; break; default: $statusBadge = 'bg-danger'; $statusText = 'Deleted'; break; } @endphp {{ $statusText }}
@endforeach
@if($totalInvestments > 1)
@if($page > 1) Previous Investment @endif
@if($page < $totalInvestments) Next Investment @endif
@endif
@else
No duplicate payouts found for this investment!
@if($totalInvestments > 1)
@if($page > 1) Previous Investment @endif
@if($page < $totalInvestments) Next Investment @endif
@endif @endif
@endsection