@extends('layouts/eims_layout') @section('title', '| ' . $pageTitle) @section('content')

Add {{ $pageTitle }}

{!! Form::open(['id' => 'feesConfigForm','class' => 'form-horizontal', 'autocomplete' => 'off']) !!}
{{-- Program/Medium/Version --}}
@php($programLabel = $companyType == 'UNV' ? 'Program' : 'Medium/Version') {!! Form::label( 'program_id', $programLabel .': *', ['class' => 'control-label text-gray col-sm-4'], false, ) !!}
{!! Form::select('program_id', $programs, $feesConfig?->program_id, [ 'class' => 'form-control', 'id' => 'program_id', 'onchange' => 'getSetSemesterClasses()', 'placeholder' => "Select $programLabel", ]) !!}

{{-- Semester/Class --}}
@php($semesterClassLabel = $companyType == 'UNV' ? 'Semester' : 'Class')
{!! Form::label( 'semester_class_id', $semesterClassLabel.': *', ['class' => 'control-label text-gray col-sm-4'], false, ) !!}
{!! Form::select('semester_class_id', $semesterClass ?? [], $feesConfig?->semester_class_id, [ 'class' => 'form-control', 'id' => 'semester_class_id', 'placeholder' => $companyType == 'UNV' ? 'Select Semester' : 'Select Class', ]) !!}

@if($companyType !== 'UNV') {{-- Group --}}
{!! Form::label( 'semester_class_group_id', 'Group: *', ['class' => 'control-label text-gray col-sm-4'], false, ) !!}
{!! Form::select('semester_class_group_id', $semesterClassGroups ?? [], $feesConfig?->semester_class_group_id, [ 'class' => 'form-control', 'id' => 'semester_class_group_id', 'placeholder' => 'Select Group', ]) !!}

@endif {{-- Effective Date --}}
{!! Form::label('effective_date', 'Effective Date: *', [ 'class' => 'control-label text-gray col-sm-4', ], false) !!}
{!! Form::text('effective_date', date('d-m-Y', strtotime($feesConfig?->effective_date ?? $branch_campus_active_date)) , [ 'id' => 'effective_date', 'class' => 'form-control', 'placeholder' => 'Enter Effective Date', 'readonly' => 'readonly', ]) !!}
{{-- Fees config name --}}
{!! Form::label('name', 'Fees config name:', [ 'class' => 'control-label text-gray col-sm-4', ], false) !!}
{!! Form::text('name', $feesConfig?->name, [ 'id' => 'name', 'class' => 'form-control', 'placeholder' => 'Enter Fees config name/Title', ]) !!}


@foreach($feesTypes as $feesType)
{!! Form::hidden('fees_type_id[]', $feesType->id) !!} {!! Form::hidden("fees_config_details_id[$feesType->id]",$feesConfigDetails[$feesType->id]->id ?? null) !!}
{!! Form::label("amount_$feesType->id", $feesType->name . ': *', [ 'class' => 'control-label text-gray col-sm-6', ], false) !!}
{!! Form::number("amount[$feesType->id]", $feesConfigDetails[$feesType->id]->amount ?? null, [ 'class' => 'form-control amount-input', 'placeholder' => 'Enter amount', 'id' => "amount_$feesType->id", 'step' => '0.01', 'min' => '0', ]) !!}
id"}}e" class="text-danger amount-error">
@foreach($feesCategories as $feesCategory)
{!! Form::radio("fees_category_ids[$feesType->id]", $feesCategory->id, ($feesConfigDetails[$feesType->id]->fees_category_id ?? null) == $feesCategory->id, [ 'class' => 'form-check-input fees-category-radio', 'id' => "fees_category_ids_" . $feesType->id . '_' . $feesCategory->id, 'data-category' => $feesCategory->name, 'data-slug' => $feesCategory->slug, ]) !!} {!! Form::label("fees_category_ids_" . $feesType->id . '_' . $feesCategory->id, $feesCategory->name) !!}
@endforeach
id"}}e" class="text-danger due-date-error">
{{-- Advance month field --}}
{!! Form::number("advance_month_fees_number[$feesType->id]", $feesConfigDetails[$feesType->id]->advance_month_fees_number ?? null, [ 'id' => "advance_month_fees_number_$feesType->id", 'class' => 'form-control advance-month-input', 'placeholder' => 'Number of Months', 'min' => '0', 'max' => '12', 'step' => '1', 'disabled' => 'disabled', ]) !!}
id"}}e" class="text-danger advance_month_error">
How many months do you want to take in advance at the time of admission?

@endforeach
{!! Form::close() !!} {{-- Submit Button --}}
Cancel
@endsection