@extends('layouts.landing') @section('title') Transactions @endsection @section('content')

Transactions

Gross Transactions
₦{{number_format($gross_amount, 2)}}
Net Payout
₦{{number_format($net_amount, 2)}}
Packages Bought
{{$bought_package}}

Clear

{{number_format($transaction_count)}} transactions

{{-- --}} @php $transaction_no = 1 @endphp @if($transactions) @foreach($transactions as $transaction) @php $transaction_no++ @endphp @php $package_expiry = App\Models\Package::where('id', $transaction->package_id)->first(); if($package_expiry){ if($package_expiry->validity == 'Days'){ $date = $package_expiry->duration; $transaction_date = \Carbon\Carbon::parse($transaction->created_at)->toFormattedDateString(); $get_date = strtotime($transaction_date); $added_date = strtotime("+$date day", $get_date); $expiry_date = date('M d, Y', $added_date); } if($package_expiry->validity == 'Months'){ $date = $package_expiry->duration; $transaction_date = \Carbon\Carbon::parse($transaction->created_at)->toFormattedDateString(); $get_date = strtotime($transaction_date); $added_date = strtotime("+$date month", $get_date); $expiry_date = date('M d, Y', $added_date); } if($package_expiry->validity == 'Years'){ $date = $package_expiry->duration; $transaction_date = \Carbon\Carbon::parse($transaction->created_at)->toFormattedDateString(); $get_date = strtotime($transaction_date); $added_date = strtotime("+$date year", $get_date); $expiry_date = date('M d, Y', $added_date); } } @endphp @if($transaction->status == 'paid') @else @endif @endforeach @else

No record found

@endif
s/n Name Email Payment Reference Payment Type Amount Package Payment Status Payment DatePackage StatusPackage Expiry Date Action
{{$transaction_no}} {{$transaction->name}} {{$transaction->email}} {{$transaction->reference}} {{$transaction->payment_type}} ₦{{number_format($transaction->amount, 2)}} {{$transaction->package}} {{$transaction->status}} {{\Carbon\Carbon::parse($transaction->created_at)->toFormattedDateString()}}{{@$expiry_date}}--
@include('elements.transaction-modal') @endsection