@extends('layouts.admin') @section('main-content')
| # | Perserta | Status | @foreach ($model->plans as $plan){{ $plan->name }} | @endforeachJumlah |
|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $user->name }} | {{ $user->remark }} | @php $total = 0; $userPlans = $user->plans->keyBy('id'); @endphp @foreach ($model->plans as $mplan) @php $up = $userPlans->get($mplan->id); if ($up && $up->payment_type == App\Models\Plan::PAYMENT_TYPE_CREDIT) $total += $up->pivot->investment; @endphp{{ $up ? (empty($up->pivot->remark) ? number_format(($up->pivot->investment / 100), 2) : $up->pivot->remark) : '' }} | @endforeach{{ number_format(($total / 100), 2) }} |