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

{{__('staticwords.invoicedetails')}}

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

{{__('staticwords.stripebillinghistory')}}

{{-- @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
{{__('staticwords.date')}} {{__('staticwords.package')}} {{__('staticwords.serviceperiod')}} {{__('staticwords.paymentmethod')}} {{__('staticwords.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)

{{__('staticwords.billinghistory')}}

@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
{{__('staticwords.date')}} {{__('staticwords.package')}} {{__('staticwords.serviceperiod')}} {{__('staticwords.paymentmethod')}} {{__('staticwords.total')}}
{{$item->created_at->toDateString()}} {{$item->plan ? $item->plan->name : 'N/A'}} {{$from}} to {{$to}} {{ucfirst($item->method)}} {{$item->price}}
@endif
@endsection