@extends('layouts.admin')
@section('title',__('adminstaticwords.Reports'))
@section('content')
{{__('adminstaticwords.AllReports')}}
@if (isset($all_reports) && count($all_reports->data) > 0)
{{__('Stripe Report')}}
| # |
{{__('adminstaticwords.Date')}} |
{{__('adminstaticwords.SubscribedPackage')}} |
{{__('adminstaticwords.PaidAmount')}} |
{{__('adminstaticwords.Method')}} |
{{__('adminstaticwords.User')}} |
@php
$sell = null;
@endphp
@foreach ($all_reports->data as $key => $report)
@php
\Stripe\Stripe::setApiKey(env('STRIPE_SECRET'));
$customer_id = \Stripe\Customer::retrieve($report->customer);
$user = Illuminate\Support\Facades\DB::table('users')->where('email', '=', $customer_id->email)->first();
$sell = $sell + (($report->plan->amount/100));
@endphp
|
{{$key+1}}
|
{{date('d/m/Y',$report->items->data[0]->created)}}
|
{{$report->items->data[0]->plan->id}}
|
{{$report->plan->amount/100}}
|
Stripe
|
@if (isset($user))
{{$user->name ? $user->name : ''}}
@else
{{__('adminstaticwords.UserRemoved')}}
@endif
|
@endforeach
{{__('adminstaticwords.TotalSells')}} {{isset($sell) ? $sell : ''}}
@endif
@if (isset($paypal_subscriptions) && count($paypal_subscriptions) > 0)
{{__('Paypal Report')}}
| # |
{{__('adminstaticwords.Date')}} |
{{__('adminstaticwords.SubscribedPackage')}} |
{{__('adminstaticwords.PaidAmount')}} |
{{__('adminstaticwords.Method')}} |
{{__('adminstaticwords.User')}} |
@foreach ($paypal_subscriptions as $key => $item)
@php
$sell = 0;
$date = $item->created_at->toDateString();
$sell = $sell + $item->price;
@endphp
|
{{$key+1}}
|
{{$date}}
|
{{$item->plan ? $item->plan->name : 'N/A'}}
|
{{$item->price}}
|
Paypal
|
{{$item->user ? $item->user->name : 'N/A'}}
|
@endforeach
{{__('adminstaticwords.TotalSells')}} {{isset($sell) ? $sell : ''}}
@endif
@endsection