@extends('layouts.master') @section('title') {{ __('receive_payment') }} @endsection @section('content')
{!! Form::model($subscriptionBill, [ 'route' => ['subscriptions-bill-payment.update', $subscriptionBill->id], 'method' => 'post', 'class' => 'edit-form', 'novalidate' => 'novalidate', 'data-success-function' => 'formSuccessFunction' ]) !!}

{{ __('subscription') . ' ' . __('bill') }} {{ __('receive_payment') }}


{{ $subscriptionBill->school->name }} #{{ $subscriptionBill->subscription->name }}

{{ date($systemSettings['date_format'], strtotime($subscriptionBill->subscription->start_date)) }} - {{ date($systemSettings['date_format'], strtotime($subscriptionBill->subscription->end_date)) }}
@php $total_user_charge = ($student_charges * $subscriptionBill->total_student) + ($staff_charges * $subscriptionBill->total_staff); $addon_charges = 0; @endphp @if ($package_type == 1) @elseif ($package_type == 0) @endif @php $exists = $subscriptionBill->subscription->addons ->contains(fn($addon) => !is_null($addon->payment_transaction_id)); @endphp @if ($exists) @endif @foreach ($subscriptionBill->subscription->addons as $addon) @if ($addon && $addon->payment_transaction_id != null) @endif @endforeach @if ($exists) @endif @if ($subscriptionBill->subscription->package_type == 0) @endif
{{ __('user') }} {{ __('charges') }} {{ __('total_user') }} {{ __('total_amount') }} ({{ $systemSettings['currency_symbol'] ?? '' }})
{{ __('students') }} {{ number_format($student_charges, 2) }} {{ $subscriptionBill->total_student }} {{ number_format($student_charges * $subscriptionBill->total_student, 2) }}
{{ __('staffs') }}
{{ __('including_teachers_and_other_staffs') }}
{{ number_format($staff_charges, 2) }} {{ $subscriptionBill->total_staff }} {{ number_format($staff_charges * $subscriptionBill->total_staff, 2) }}
{{ __('Total User Charges') }} {{ $systemSettings['currency_symbol'] ?? '' }} {{ number_format($total_user_charge, 2) }}
{{ __('students') }} {{ __('included_in_package') }} {{ $subscriptionBill->total_student }} {{ __('included_in_package') }}
{{ __('staffs') }}
{{ __('including_teachers_and_other_staffs') }}
{{ __('included_in_package') }} {{ $subscriptionBill->total_staff }} {{ __('included_in_package') }}
{{ __('Total User Charges') }} {{ __('included_in_package') }}
{{ __('addon_charges') }}
{{ __('addon') }} {{ __('total_amount') }} ({{ $systemSettings['currency_symbol'] ?? '' }})
{{ $addon->feature->name }} {{ number_format($addon->price, 2) }} @if ($addon && $addon->payment_transaction_id != null) @php $addon_charges += $addon->price; @endphp @else @php $addon_charges = 0; @endphp @endif
{{ __('total_addon_charges') }} {{ $systemSettings['currency_symbol'] ?? '' }} {{ number_format($addon_charges, 2) }}
{{ __('package_amount') }} {{ $systemSettings['currency_symbol'] ?? '' }} {{ number_format(ceil(($subscriptionBill->amount) * 100) / 100, 2) }}
{{ __('total_bill_amount') }} @if ($subscriptionBill->subscription->package_type == 1) {{ $systemSettings['currency_symbol'] ?? '' }} {{ number_format(ceil(($total_user_charge + $addon_charges) * 100) / 100, 2) }} @else {{ $systemSettings['currency_symbol'] ?? '' }} {{ number_format(ceil(($subscriptionBill->amount + $addon_charges) * 100) / 100, 2) }} @endif
{!! Form::hidden('school_id', $subscriptionBill->school_id, [null]) !!} {!! Form::hidden('amount', number_format(ceil(($subscriptionBill->amount) * 100) / 100, 2), [null]) !!}
@if ($subscriptionBill->transaction && $subscriptionBill->transaction->payment_gateway == 'Cash')
@else
@endif
{!! Form::text('cheque_number', $subscriptionBill->transaction ? $subscriptionBill->transaction->order_id : null, ['required', 'class' => 'form-control', 'placeholder' => __('enter_cheque_number')]) !!}
@endsection @section('script') @endsection