IMMREX7
@extends('schools.school_layout')
@section('content')
@include('schools.feeheads.advance_search')
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>@if(isset($feehead))Edit @else Add @endif</strong> Fee Header</h2>
</div>
<div class="body">
@if(isset($feehead))
{!! Form::model($feehead, ['method' => 'PATCH', 'action' => ['School\FeeHeadController@update', $feehead->idFeehead], 'class' => 'form-horizontal']) !!}
@else
{!! Form::open(['url' => 'school/feeheads', 'class' => 'form-horizontal','id'=>'feehead_form']) !!}
@endif
<div class="row clearfix">
<div class="col-sm-2 form-control-label required">
<label for="classname">Select Class</label>
</div>
<div class="col-sm-3">
<div class="form-group">
{!! Form::select('idClass',$classes,null,['class' => 'form-control show-tick ms select2']) !!}
@if ($errors->has('idClass'))
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>{{ $errors->first('idClass') }}</strong>
</label>
@endif
<span id='classerror'></span>
</div>
</div>
<div class="col-sm-2 form-control-label required">
<label for="classname">Select Section</label>
</div>
<div class="col-sm-3">
<div class="form-group">
@if(isset($feehead))
{!! Form::select('idSection',$section,null,['class' => 'form-control show-tick ms select2']) !!}
@else
<div id="idSection" style="border:1px solid #ccc; width:200px; height: 110px; overflow-y: scroll;">
</div>
@if ($errors->has('idSection'))
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>{{ $errors->first('idSection') }}</strong>
</label>
@endif
<span id='sectionerror'></span>
@endif
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-2 form-control-label required">
<label for="classname">Fee Header Name</label>
</div>
<div class="col-sm-3">
<div class="form-group">
{!! Form::text('feeheadName',null,['class' => 'form-control']) !!}
<span id='feeheaderror'></span>
</div>
</div>
@if(auth()->user()->idSchool == 25)
<div class="col-sm-2 form-control-label required">
<label for="classname">Fee ID</label>
</div>
<div class="col-sm-3">
<div class="form-group">
{!! Form::select('feeheadLabel',['' => 'Not Applicable','Plan A' => 'Plan A','Plan B' => 'Plan B','Plan C' => 'Plan C',],null,['class' => 'form-control show-tick ms select2']) !!}
<span id='feeheaderror'></span>
</div>
</div>
@else
<input type="hidden" name="feeheadLabel" value=""/>
@endif
</div>
<div class="row clearfix">
<div class="col-sm-2 form-control-label required">
<label for="classname">Student Category</label>
</div>
<div class="col-sm-3">
<div class="form-group">
@if(isset($feehead))
<div class="checkbox-inline" style="padding-left:10px;"><input type="checkbox" name="studentCategory" value="{{$feehead->studentCategory}}" class="categoryclass" checked disabled>
<label> {{$feehead->studentCategory}} </label>
</div>
@else
<div id="idCategory" style="border:1px solid #ccc; width:200px; height: 110px; overflow-y: scroll;">
<div class="checkbox-inline" style="padding-left:10px;"><input type="checkbox" name="studentCategory[]" value="All" class="categoryclass">
<label> All </label>
</div>
@foreach($categories as $var)
<div class="checkbox-inline" style="padding-left:10px;"><input type="checkbox" name="studentCategory[]" value="{{$var}}" class="categoryclass"><label> {{$var}} </label></div>
@endforeach
</div>
@endif
@if ($errors->has('studentCategory'))
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>{{ $errors->first('studentCategory') }}</strong>
</label>
@endif
<span id='categoryerror'></span>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-2 form-control-label required">
<label for="classname">From Date</label>
</div>
<div class="col-sm-3">
<div class="form-group">
{!! Form::text('fromDate',null,['class' => 'form-control datepicker']) !!}
@if ($errors->has('fromDate'))
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>{{ $errors->first('fromDate') }}</strong>
</label>
@endif
<span id='fdate_error'></span>
</div>
</div>
<div class="col-sm-2 form-control-label required">
<label for="classname">To Date</label>
</div>
<div class="col-sm-3">
<div class="form-group">
{!! Form::text('toDate',null,['class' => 'form-control datepicker']) !!}
@if ($errors->has('toDate'))
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>{{ $errors->first('toDate') }}</strong>
</label>
@endif
<span id='todate_error'></span>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-2 form-control-label required">
<label for="classname">Amount</label>
</div>
<div class="col-sm-3">
<div class="form-group">
{!! Form::text('amount',null,['class' => 'form-control','onkeypress'=>'return onlyNumbersandSpecialChar(event)']) !!}
@if ($errors->has('amount'))
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>{{ $errors->first('amount') }}</strong>
</label>
@endif
<span id='amounterror'></span>
</div>
</div>
<div class="col-sm-2 form-control-label">
<input type="radio" name="fines" value="per" class="fineradio"> <label for="classname">Fine Per Day</label>
</div>
<div class="col-sm-3">
<div class="form-group">
{!! Form::text('fine',null,['class' => 'form-control','onkeypress'=>'return onlyNumbersandSpecialChar(event)']) !!}
@if ($errors->has('fine'))
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>{{ $errors->first('fine') }}</strong>
</label>
@endif
<span id='fineerror'></span>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-2 form-control-label">
<label for="classname">EC No.</label>
</div>
<div class="col-sm-3">
<div class="form-group">
@if(isset($feehead))
{!! Form::select('idStudent',$student,null,['class' => 'form-control show-tick ms']) !!}
@else
<span style="color:red; font-size: 12px;">Please don't select this list if you want to save a structure on entire class or section.</span>
<div id="idStudent" style="border:1px solid #ccc; width:250px; height: 140px; overflow-y: scroll;">
</div>
@if ($errors->has('ecNO'))
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>{{ $errors->first('ecNO') }}</strong>
</label>
@endif
@endif
</div>
</div>
<div class="col-sm-2 form-control-label">
<input type="radio" name="fines" value="flat" class="fineradio">
<label for="classname">Flat Fine</label>
</div>
<div class="col-sm-3">
<div class="form-group">
{!! Form::text('flatFine',null,['class' => 'form-control','onkeypress'=>'return onlyNumbersandSpecialChar(event)']) !!}
@if ($errors->has('flatFine'))
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>{{ $errors->first('flatFine') }}</strong>
</label>
@endif
<span id='flatfineerror'></span>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-2 form-control-label">
<label for="classname">Description</label>
</div>
<div class="col-sm-5">
<div class="form-group">
{!! Form::textarea('description',null,['class' => 'form-control','size'=>'30x2']) !!}
@if ($errors->has('description'))
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>{{ $errors->first('description') }}</strong>
</label>
@endif
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-8 offset-sm-2">
@if(isset($feehead))
{!! Form::submit('UPDATE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']) !!}
@else
{!! Form::submit('SAVE',['class' => 'btn btn-raised btn-primary btn-round waves-effect','id'=>'submit-btn']) !!}
@endif
{!! Form::close() !!}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>List Of Fee Header</strong></h2>
</div>
<div class="body table-responsive">
<table class="table" id='tableexp'>
<thead>
<tr>
<th>S. No.</th>
<th>Class</th>
<th>EC No.</th>
<th>Section</th>
<th>Category</th>
<th>Header</th>
<th>Amount</th>
<th>Date</th>
<th>Fine Per Day</th>
<th>Flat Fine</th>
<th>Description</th>
<th>Created By</th>
<th>Edited By</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
@foreach($feeheads as $value)
<tr>
<th scope="row">{{$i}}</th>
<td>{{$value->classM->className}}</td>
<td>{{$value->student->ecNo or ''}}</td>
<td>{{$value->section->sectionName or ''}}</td>
<td>{{$value->studentCategory}}</td>
<td>{{$value->feeheadName}}</td>
<td>{{$value->amount}}</td>
<td>{{$value->fromDate}} To {{$value->toDate}}</td>
<td>{{$value->fine}}</td>
<td>{{$value->flatFine}}</td>
<td>{{$value->description}}</td>
@if(isset($value->collector))
<td>{{$value->collector}}</td>
@else
<td></td>
@endif
@if(isset($value->updater_name))
<td>{{$value->updater_name}}</td>
@else
<td></td>
@endif
<td>
<a href="{{ url('school/feeheads/' . $value->idFeehead . '/edit') }}" class="btn btn-raised btn-info waves-effect btn-round">Edit </a>
<button class="btn btn-raised btn-danger waves-effect btn-round js-sweetalert" data-id="{{$value->idFeehead}}" data-type="confirm">DELETE</button>
</td>
</tr>
<?php $i++; ?>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@stop
@section('script')
@include('schools.feeheads.feehead_script')
@stop
Copyright © 2021 -