IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<!--<div class="card">-->
<div class="body">
<button class="btn btn-raised btn-warning btn-round waves-effect" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">Advance Search</button>
<div class="collapse" id="collapseExample">
<div class="well">
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Advance Search</strong></h2>
</div>
<div class="body">
<?php echo Form::open(['method' => 'GET', 'action' => ['School\StdTransactionReportController@headerClass'], 'class' => 'form-horizontal']); ?>
<div class="row clearfix">
<div class="col-sm-6">
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname">Class</label>
</div>
<div class="col-sm-7">
<div class="form-group">
<div style="border:1px solid #ccc; width:250px; height: 150px; overflow-y: scroll;">
<?php $__currentLoopData = $classes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="checkbox-inline" style="padding-left:10px;padding-top:5px;">
<input type="checkbox" name="classes[]" value="<?php echo e($key); ?>" class="class_ids">
<label><?php echo e($value); ?></label>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname">Section</label>
</div>
<div class="col-sm-7">
<div class="form-group">
<div id="idSection" style="border:1px solid #ccc; width:250px; height: 150px; overflow-y: scroll;">
</div>
<!--<select name='idSection' id="idSection" class="form-control show-tick ms"></select>-->
</div>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-8 offset-sm-2">
<?php echo Form::submit('Search',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>
<?php echo Form::close(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--</div>-->
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Student Wise Fee Data</strong></h2>
</div>
<div class="body table-responsive">
<table class="table table-bordered table-striped table-hover dataTable" id="tableexp">
<thead>
<tr>
<th>Ec No.</th>
<th>Name</th>
<th>Class</th>
<th>Section </th>
<th>Category </th>
<th>Full Payment</th>
<th>Term I</th>
<th>Term II</th>
<th>Installment I</th>
<th>Installment II</th>
<th>Installment III</th>
<th>Installment IV</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $students; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($var->ecNo); ?></td>
<td><?php echo e($var->firstName); ?> <?php echo e($var->middleName); ?> <?php echo e($var->lastName); ?></td>
<td><?php if(isset($var->classM)): ?> <?php echo e($var->classM->className); ?> <?php endif; ?></td>
<td><?php if(isset($var->section)): ?> <?php echo e($var->section->sectionName); ?> <?php endif; ?></td>
<td><?php echo e($var->studentType); ?></td>
<?php
$additional = DB::table('student_transaction')
->where('student_transaction.idSchool', '=', $var->idSchool)
->where('student_transaction.idStudent', '=', $var->idStudent)
->where('student_transaction.idFinancialYear', '=',$var->idFinancialYear)
->select(DB::raw('SUM(additionalAmount) as extraAmount'))
->where(function($query) {
$query->whereNull('status');
$query->orWhere('status', '=', 'In-Process');
$query->orWhere('status', '=', 'Cleared');
$query->orWhere('status', '=', 'Success');
})->first();
$outstanding = \DB::table('feeheads')
->where('idStudent', '=', $var->idStudent)
->where('idFinancialYear', '=', $var->idFinancialYear)
->where('feeheadName', '=', "Outstanding Payment");
$class_feeheads = \DB::table('feeheads')->where('idClass', '=', $var->idClass)
->where('idSection', '=', $var->idSection)
->where('idFinancialYear','=', $var->idFinancialYear)
->where('studentCategory', '=', $var->studentType)
->whereNull('idStudent');
$allcat_feeheads = \DB::table('feeheads')->where('idClass', '=', $var->idClass)
->where('idSection', '=', $var->idSection)
->where('studentCategory', '=', 'All')
->where('idFinancialYear','=', $var->idFinancialYear)
->whereNull('idStudent');
$feeheads = \DB::table('feeheads')->where('idStudent', '=', $var->idStudent)
->where('idFinancialYear','=', $var->idFinancialYear)
->union($class_feeheads)
->union($allcat_feeheads)
->union($outstanding)
->orderBy('idFeehead','ASC')
->orderBy('toDate')
->get();
$full_payment = 0;
$discount = 0;
$fine = 0;
$extra = 0;
$total = 0;
$full = 0;
$outstanding = 0;
$term_1 = 0;
$term_2 = 0;
$installment_1 = 0;
$installment_2 = 0;
$installment_3 = 0;
$installment_4 = 0;
$planA = 0;
$planB = 0;
$planC = 0;
$plan = '';
foreach($feeheads as $headers){
if (str_contains($headers->feeheadLabel, 'Plan A') && str_contains($headers->feeheadName, 'Full Payment')){
$full = $headers->amount;
$plan = 'Plan A';
}
if (str_contains($headers->feeheadLabel, 'Plan B') && $headers->feeheadName == 'Fees in Term- I'){
$term_1 = $headers->amount;
$plan = 'Plan B';
}
if (str_contains($headers->feeheadLabel, 'Plan B') && str_contains($headers->feeheadName, 'Term- II')){
$term_2 = $headers->amount;
}
if (str_contains($headers->feeheadLabel, 'Plan C') && str_contains($headers->feeheadName, 'Installment - I')){
$installment_1 = $headers->amount;
$plan = 'Plan C';
}
if (str_contains($headers->feeheadLabel, 'Plan C') && str_contains($headers->feeheadName, 'Installment - II')){
$installment_2 = $headers->amount;
}
if (str_contains($headers->feeheadLabel, 'Plan C') && str_contains($headers->feeheadName, 'Installment - III')){
$installment_3 = $headers->amount;
}
if (str_contains($headers->feeheadLabel, 'Plan C') && str_contains($headers->feeheadName, 'Installment - IV') ){
$installment_4 = $headers->amount;
}
}
if($additional != null)
$extra = $additional->extraAmount;
?>
<td><?php echo e($full); ?></td>
<td><?php echo e($term_1); ?></td>
<td><?php echo e($term_2); ?></td>
<td><?php echo e($installment_1); ?></td>
<td><?php echo e($installment_2); ?></td>
<td><?php echo e($installment_3); ?></td>
<td><?php echo e($installment_4); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</section>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$('.selectAll').on('click', function () {
var checkAll = this.checked;
if (checkAll === true) {
$('input[type=checkbox]').each(function () {
this.checked = checkAll;
});
} else {
$('input[type=checkbox]').each(function () {
this.checked = checkAll;
});
}
});
$(function () {
$('#tableexp').DataTable({
dom: 'Bfrtip',
scrollY: "500px",
scrollX: true,
scrollCollapse: true,
fixedColumns: {
left: 1
},
buttons: [
{
extend: 'csv', footer: true, text: 'Export to Excel',title:'Student Due Report',
}
]
});
});
$(document).on('click', '.class_ids', function () {
//var checkAll = this.checked;
var classIds = [];
$("input:checkbox[name='classes[]']:checked").each(function () {
classIds.push($(this).val());
});
if (classIds.length > 0) {
$.ajax({
url: "<?php echo e(url('/school/schclass')); ?>" + '/' + classIds + "/sections",
type: "GET",
dataType: "json",
success: function (data) {
$('#idSection').empty();
$('#idSection').append('<div class="checkbox-inline" style="padding-left:10px;padding-top:5px;"><input type="checkbox" class="select-all" id="selectall"><label><strong>Select All</label></strong></div>');
$.each(data, function (key, value) {
$('#idSection').append('<div class="checkbox-inline" style="padding-left:10px;"><input type="checkbox" name="sections[]" value="' + key + '" class="sectionclass"><label>' + value + '</label></div>');
});
}
});
}
});
$(document).on('click', '.select-all', function () {
var checkAll = this.checked;
if (checkAll === true) {
$('.sectionclass').each(function () {
this.checked = checkAll;
});
} else {
$('.sectionclass').each(function () {
this.checked = checkAll;
});
}
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('schools.school_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -