@extends('layouts.theme') @section('main-wrapper')

{{__('invoice details')}}

@if(isset($invoices) && $invoices != null)

{{__('stripe billing history')}}

{{-- @dd($invoices); --}} @foreach($invoices as $invoice) {{-- @dd($invoice->created); --}} @php $from = Carbon\Carbon::parse($invoice->subscription_from); $from = $from->toDateString(); $to = Carbon\Carbon::parse($invoice->subscription_to); $to = $to->toDateString(); $created = Carbon\Carbon::parse($invoice->created); $created = $created->toDateString(); $plan = App\Package::where('plan_id',$invoice->lines->data[0]->plan->id)->first(); @endphp @endforeach
{{__('date')}} {{__('package')}} {{__('service period')}} {{__('payment method')}} {{__('total')}}
{{$created}} {{$plan->name}} {{$from}} to {{$to}} Stripe {{$invoice->lines->data[0]->plan->amount/100}}
@endif @if (isset($paypal_subscriptions) && $paypal_subscriptions != null && count($paypal_subscriptions) > 0)

{{__('billing history')}}

@foreach ($paypal_subscriptions as $item) @php $from = Carbon\Carbon::parse($item->subscription_from); $from = $from->toDateString(); $to = Carbon\Carbon::parse($item->subscription_to); $to = $to->toDateString(); @endphp @endforeach
{{__('date')}} {{__('package')}} {{__('service period')}} {{__('payment method')}} {{__('total')}}
{{$item->created_at->toDateString()}} {{$item->plan ? $item->plan->name : 'N/A'}} {{$from}} to {{$to}} {{ucfirst($item->method)}} {{$item->price}}
@endif
@endsection