@extends('layouts.master') @section('title') {{ __('subscription') }} @endsection @section('content')
{{-- Active plan --}}

{{ __('active_plan') }}

@if (!empty($features)) {{ __('update_current_plan') }} @else   @endif

{!! Form::text('name', $active_package ? $active_package->name : null, [ 'class' => 'form-control form-control-sm', 'readonly', ]) !!}
{!! Form::text('start_date', $active_package ? format_date($active_package->start_date) : null, [ 'class' => 'form-control form-control-sm', 'readonly', ]) !!}
{!! Form::text('end_date', $active_package ? format_date($active_package->end_date) : null, [ 'class' => 'form-control form-control-sm', 'readonly', ]) !!}
@if ($active_package && $active_package->package_type == 1)
{!! Form::text('student_charge', $active_package ? $active_package->student_charge : null, [ 'class' => 'form-control form-control-sm', 'readonly', ]) !!}
{!! Form::text('staff_charge', $active_package ? $active_package->staff_charge : null, [ 'class' => 'form-control form-control-sm', 'readonly', ]) !!}
@else
{!! Form::text('student_charge', $active_package ? $active_package->no_of_students : null, [ 'class' => 'form-control form-control-sm', 'readonly', ]) !!}
{!! Form::text('staff_charge', $active_package ? $active_package->no_of_staffs : null, [ 'class' => 'form-control form-control-sm', 'readonly', ]) !!}
@endif
@if ($active_package)

{{ __('features') }}

@foreach ($active_package->subscription_feature as $feature)
@endforeach @endif

{{ __('addons') }}

@if ($active_package) @foreach ($active_package->addons as $addon)
@endforeach @endif
{{-- Upcoming billing cycle plan --}}
@if ($upcoming_package && ($school_settings['auto_renewal_plan'] ?? 0))
@if ($upcoming_package->subscription_bill && $upcoming_package->subscription_bill->transaction && $upcoming_package->subscription_bill->transaction->payment_status == "succeed" && $upcoming_package->id != $active_package->id)

{{ __('upcoming_plan') }}

{{ __('paid') }}
@else

{{ __('upcoming_plan') }}

@endif

{{ __('features') }}

    @foreach ($upcoming_package->package->package_feature as $feature)
  • {{ __($feature->feature->name) }}
  • @endforeach

{{ __('addons') }}

    @if ($active_package) @foreach ($active_package->addons as $addon)
  • @if ($addon->status) {{ __($addon->feature->name) }} @else {{ __($addon->feature->name) }} @endif
  • @endforeach @endif
{{ __('Note : Certain additional features will not be part of the next billing period as they have already been integrated into your upcoming subscription package') }}
@if ($upcoming_package->subscription_bill && $upcoming_package->subscription_bill->transaction && $upcoming_package->subscription_bill->transaction->payment_status == "succeed" && $active_package && $upcoming_package->id != $active_package->id) @else @endif
@else

{{ __('upcoming_plan') }}


@endif

{{ __('Active Subscription Billing Details') }}


@if ($active_package)
{{-- Postpaid --}} @if ($active_package->package_type == 1) @if ($active_package->package_type == 1) @else @endif @if ($active_package->package_type == 1) @else @endif {{-- Prepaid --}} @else @endif @php $total_addon_charges = 0; @endphp @if ($active_package) @foreach ($active_package->addons as $addon) @php $total_addon_charges += $addon->price; @endphp @endforeach @endif @if ($active_package->package_type == 1) @else @endif
@if ($active_package->package_type == 1) {{ __('postpaid') }} @else {{ __('prepaid') }} @endif
{{ __('plan') }} {{ __('user') }} {{ __('charges') }} ({{ $system_settings['currency_symbol'] }}) {{ __('total_user') }} {{ __('total_amount') }} ({{ $system_settings['currency_symbol'] }})
{{ $active_package->name }} {{ __('students') }} {{ $active_package->student_charge }}{{ $data['students'] }}{{ $data['students'] }} / {{ $active_package->no_of_students }} {{ number_format($data['students'] * $active_package->student_charge, 2) }}
{{ __('staffs') }}
{{ __('including_teachers_and_other_staffs') }}
{{ $active_package->staff_charge }}{{ $data['staffs'] }}{{ $data['staffs'] }} / {{ $active_package->no_of_staffs }} {{ number_format($data['staffs'] * $active_package->staff_charge, 2) }}
{{ __('Total User Charges') }} : {{ $system_settings['currency_symbol'] }} {{ number_format($data['students'] * $active_package->student_charge + $data['staffs'] * $active_package->staff_charge, 2) }} @php $total_user_charges = $data['students'] * $active_package->student_charge + $data['staffs'] * $active_package->staff_charge; @endphp
{{ __('package_amount') }} : {{ $system_settings['currency_symbol'] }} {{ number_format($active_package->charges, 2) }}
{{ __('addon_charges') }}
{{ __('addon') }} {{ __('total_amount') }} ({{ $system_settings['currency_symbol'] }})
{{ __($addon->feature->name) }} {{ number_format($addon->price, 2) }}
{{ __('total_addon_charges') }} : {{ $system_settings['currency_symbol'] }}{{ number_format($total_addon_charges, 2) }}
{{ __('total_bill_amount') }} : {{ $system_settings['currency_symbol'] }}{{ number_format($total_addon_charges + $total_user_charges, 2) }} {{ $system_settings['currency_symbol'] }}{{ number_format($active_package->charges, 2) }}
@endif

{{ __('history') }}

{{ __('id') }} {{ __('no.') }} {{ __('bill_generate_date') }} {{ __('due_date') }} {{ __('name') }} {{ __('type') }} {{ __('description') }} {{ __('transaction_id') }} {{ __('total_students') }} {{ __('total_staffs') }} {{ __('Amount') }} {{ __('status') }} {{ __('action') }}
{{-- Bill details --}}
@endsection @section('js') @endsection