@extends('backEnd.master') @section('mainContent')
@if (isset($subscription))

{{ __('seller.subscription_info') }}

@if(permissionCheck('seller.subscription_payment_select')) {{ __('seller.advance_renew_subscription') }} @endif

{{ __('seller.subscription_title') }}

{{ $subscription->pricing->name }}

{{ __('common.price') }}

@if($sellerAccount->subscription_type == "monthly") {{ single_price($subscription->pricing->monthly_cost)}} (Monthly) @else {{single_price($subscription->pricing->yearly_cost) }} (Yearly) @endif

{{ __('seller.last_payment_date') }}

@if($subscription->is_paid == 1 && $subscription->last_payment_date != null) {{date(app('general_setting')->dateFormat->format, strtotime(Carbon\Carbon::createFromFormat('Y-m-d', $subscription->last_payment_date)))}} @else {{ __('common.pay_first_for_subcription') }} @endif

{{ __('seller.expire_date') }}

@php $current_date = strtotime(date("Y-m-d")); $expiry_date = strtotime($subscription->expiry_date); @endphp @if($subscription->is_paid == 1 && $subscription->expiry_date != null && $current_date < $expiry_date) {{ date(app('general_setting')->dateFormat->format, strtotime(Carbon\Carbon::createFromFormat('Y-m-d', $subscription->expiry_date))) }} @elseif($subscription->expiry_date != null && $current_date > $expiry_date) {{__('seller.already_expired')}} @endif

@endif

{{ __('seller.subscription_payments') }}

@if (isset($subscription)) @foreach ($subscription_payment as $key => $payment) @endforeach @endif
{{ __('common.date') }} {{ __('common.name') }} {{ __('common.txn') }} {{ __('common.payment_type') }} {{ __('common.total_amount') }} {{ __('common.status') }}
{{ date(app('general_setting')->dateFormat->format, strtotime($payment->created_at)) }} {{ $payment->title }} {{ $payment->subscription_payment->txn_id }} {{ $payment->subscription_payment->commission_type }} {{ single_price($payment->amount) }} @if($payment->subscription_payment->is_approved) {{__('common.approved')}} @else {{__('common.pending')}} @endif
@endsection