@extends('layouts.app') @section('title') {{ __('messages.subscription_plan.payment_type') }} @endsection @section('content')
@include('flash::message')
{{ Form::hidden('toast_data', session('toast-data'), ['id' => 'toastDataId']) }} @php $cpData = getCurrentPlanDetails(); $planText = $cpData['isExpired'] ? __('messages.plans.current_expired_plan') : __('messages.plans.current_plan'); $currentPlan = $cpData['currentPlan']; @endphp
@if (currentActiveSubscription()->ends_at >= \Carbon\Carbon::now())

{{ $planText }}

{{ __('messages.plans.plan_name') }}

{{ $cpData['name'] }}

{{ __('messages.plans.plan_price') }}

{{ getSubscriptionPlanCurrencyIcon($currentPlan->currency) }} {{ number_format($currentPlan->price) }}

{{ __('messages.plans.start_date') }}

{{ $cpData['startAt'] }}

{{ __('messages.plans.end_date') }}

{{ $cpData['endsAt'] }}

{{ __('messages.plans.used_days') }}

{{ $cpData['usedDays'] }} {{ __('messages.plans.days') }}

{{ __('messages.plans.remaining_days') }}

{{ $cpData['remainingDays'] }} {{ __('messages.plans.days') }}

{{ __('messages.plans.used_balance') }}

{{ getSubscriptionPlanCurrencyIcon($currentPlan->currency) }} {{ $cpData['usedBalance'] }}

{{ __('messages.plans.remaining_balance') }}

{{ getSubscriptionPlanCurrencyIcon($currentPlan->currency) }} {{ $cpData['remainingBalance'] }}
@endif @php $newPlan = getProratedPlanData($subscriptionsPricingPlan->id); @endphp

{{ __('messages.plans.new_plan') }}

{{ __('messages.plans.plan_name') }}

{{ $newPlan['name'] }}

{{ __('messages.plans.plan_price') }}

{{ getSubscriptionPlanCurrencyIcon($subscriptionsPricingPlan->currency) }} {{ number_format($subscriptionsPricingPlan->price) }}

{{ __('messages.plans.start_date') }}

{{ $newPlan['startDate'] }}

{{ __('messages.plans.end_date') }}

{{ $newPlan['endDate'] }}

{{ __('messages.plans.total_days') }}

{{ $newPlan['totalDays'] }} {{ __('messages.plans.days') }}

{{ __('messages.plans.remaining_balance_of') }}

{{ getSubscriptionPlanCurrencyIcon($subscriptionsPricingPlan->currency) }} {{ $newPlan['remainingBalance'] }}

{{ __('messages.event.payable_amount') }}

{{ getSubscriptionPlanCurrencyIcon($subscriptionsPricingPlan->currency) }} {{ $newPlan['amountToPay'] }}
@if ($newPlan['amountToPay'] > 0)
{{-- {{ Form::select('payment_type', $paymentTypes, \App\Models\Subscription::TYPE_STRIPE, ['class' => 'form-select','required', 'id' => 'paymentType']) }} --}} {{ Form::select('payment_type', subscriptionPaymentTypes(), null, ['class' => 'form-select', 'required', 'id' => 'paymentType']) }}
@if (!empty(currentActiveSubscription()) && currentActiveSubscription()->ends_at >= \Carbon\Carbon::now())
@else
@endif
{{ Form::label('attachment', __('messages.cash_payment.attachment') . ':', ['class' => 'form-label']) }}
{{ Form::label('note', __('messages.cash_payment.note') . ':', ['class' => 'form-label']) }} {{ Form::textarea('note', null, ['class' => 'form-control payment-note', 'rows' => 3]) }}
@else
@endif @php if ( !empty(getSettingData()['stripe_checkbox_btn']) && getSettingData()['stripe_checkbox_btn'] == 1 ) { $stripeKey = getSettingData()['stripe_key']; } else { $stripeKey = config('services.stripe.key'); } @endphp
@endsection @section('scripts') @endsection