@extends('app') @section('content') @include('layout.admin_sidebar')
Payments
@php $lastShownMonth = null; // Initialize variable to track the last displayed month @endphp @foreach($payments as $payment) {{-- Show the subscription amount only for the first entry of each month --}} @endforeach
# Transaction ID Pay it Forward™ Kick it Back™ Subscription Transaction Fee Transaction Status Date
{{ $loop->iteration }} {{ $payment->transaction_id ?? 'N/A' }} ${{ number_format($payment->pay_it_forward, 2, '.', ',') ?: '0.00' }} {{ '$' . $payment->kick_it_back }} @php // Format the created_at date to get the month and year $currentMonth = \Carbon\Carbon::parse($payment->created_at)->format('Y-m'); @endphp @if ($lastShownMonth !== $currentMonth) {{$payment->amount }} {{-- Show the subscription amount --}} @php $lastShownMonth = $currentMonth; @endphp @else - @endif hihkkm {{ \Carbon\Carbon::parse($payment->payment_created_at)->format('F-d-Y') ?? now()->format('F-d-Y') }}
@if($payments && $payments->count() > 0) @foreach($payments as $payment)
{{$payment->transaction_id ?? 'N/A'}}
Pay it Forward™: {{'$'.$payment->pay_it_forward}}
Kick it Back™: {{'$'.$payment->kick_it_back}}
Subscription: {{ $payment->amount }}
Transaction Fee: @php // Format the created_at date to get the month and year $currentMonth = \Carbon\Carbon::parse($payment->created_at)->format('Y-m'); @endphp @if ($lastShownMonth !== $currentMonth) {{$payment->amount}} {{-- Display the subscription amount --}} @php $lastShownMonth = $currentMonth; @endphp @else - @endif
Date: {{ \Carbon\Carbon::parse($payment->payment_created_at)->format('F-d-Y') ?? now()->format('F-d-Y') }}
@endforeach @endif
@vite(['resources/js/pages/admin_dashboard.js']) @vite(['resources/js/admin_panel/payment.js']) @vite(['resources/js/admin_panel/pagination.js']) @vite(['resources/js/admin_panel/paginationmobile.js']) @endsection