IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/storage/framework/views/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/storage/framework/views/d63daf1471a2d22c7c4c738cf366419a9c8ddc20.php

<?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\BusFeeReportController@pendingDues'], '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 class="row clearfix">
                                                <div class="col-sm-3 form-control-label">
                                                    <label for="classname">From Date</label>
                                                </div>
                                                <div class="col-sm-5">
                                                    <div class="form-group">
                                                        <?php echo Form::text('fromDate',null,['class' => 'form-control datepicker']); ?>

                                                    </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 class="row clearfix">
                                                <div class="col-sm-3 form-control-label">
                                                    <label for="classname">To Date</label>
                                                </div>
                                                <div class="col-sm-5">
                                                    <div class="form-group">
                                                        <?php echo Form::text('toDate',null,['class' => 'form-control datepicker']); ?>

                                                    </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>Students Due Data</strong></h2>
            </div>
            <div class="body table-responsive">
                <table class="table table-bordered table-striped table-hover dataTable" id="tableexp">
                    <thead>
                        <tr>
                            <!--<th><input type="checkbox" class='checkbox-inline selectAll'></th>-->
                            <th>Ec No.</th>
                            <th>Name</th>
                            <th>Father </th>
                            <th>Mobile</th>
                            <th>Class</th>
                            <th>Section</th>
                            <th>Total Fee</th>
                            <th>Paid</th>
                            <th>Discount</th>
                            <th>Penalty</th>
                            <th>Total Due</th>
                            <!--<th>Unpaid Due</th>-->
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $students; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php $stdtransport = \App\StudentTransport::where('idStudent', '=', $var->idStudent)->where('idFinancialYear', '=', getFinancialYear())->first();
                            ?>
                        <?php if($stdtransport != null): ?>    
                        <tr>
                            <?php
                            $feeheads = \App\BusFeehead::where('idStop', '=', $stdtransport->idStop)
                                    ->orderBy('toDate')
                                    ->get();
                            $feetotal = $feeheads->sum('amount');
                            $transaction = DB::table('bus_transaction')
                                    ->leftJoin('bus_excess_transaction', 'bus_transaction.idBusExcessTransaction', '=', 'bus_excess_transaction.idBusExcessTransaction')
                                    ->where('idStudent', '=', $var->idStudent)
                                    ->where(function($query) {
                                        $query->whereNull('status');
                                        $query->orWhere('status', '=', 'In-Process');
                                        $query->orWhere('status', '=', 'Cleared');
                                        $query->orWhere('status', '=', 'Success');
                                    })
                                    ->select(DB::raw('SUM(excessAmount) as excessAmount'), DB::raw('SUM(totalPaid) as totalPaid'), DB::raw('SUM(discount) as discount'), DB::raw('SUM(fine) as fine'), DB::raw('SUM(penaltyAmount) as penaltyAmount'),'bus_transaction.chequeBounceCharge')
                                    ->first();
                            $lesstransaction = DB::table('bus_lesser_transaction')
                                    ->leftJoin('bus_excess_transaction', 'bus_lesser_transaction.idBusExcessTransaction', '=', 'bus_excess_transaction.idBusExcessTransaction')
                                    ->where('idStudent', '=', $var->idStudent)
                                    ->where(function($query) {
                                        $query->whereNull('status');
                                        $query->orWhere('status', '=', 'In-Process');
                                        $query->orWhere('status', '=', 'Cleared');
                                        $query->orWhere('status', '=', 'Success');
                                    })
                                    ->select(DB::raw('SUM(excessAmount) as excessAmount'), DB::raw('SUM(totalPaid) as totalPaid'), DB::raw('SUM(discount) as discount'), DB::raw('SUM(fine) as fine'), DB::raw('SUM(penaltyAmount) as penaltyAmount'),'bus_lesser_transaction.chequeBounceCharge')
                                    ->first();
                            ?>
                            <!--<td><input type="checkbox" name="students[]" value="<?php echo e($var->idStudent); ?>"></td>-->
                            <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 echo e($var->father_fname); ?> <?php echo e($var->father_lname); ?></td>
                            <td><?php echo e($var->father_mobile); ?></td>
                            <td><?php echo e($var->className); ?></td>
                            <td><?php echo e($var->sectionName); ?></td>
                            <td><?php echo e($feetotal); ?></td>
                            <td>
                                <?php if($transaction->totalPaid!=null): ?>
                                <?php echo e($transaction->totalPaid); ?>

                                <?php else: ?>
                                0.00
                                <?php endif; ?>
                            </td>
                            <td>
                                <?php if($transaction->discount!=null): ?>
                                <?php echo e($transaction->discount); ?>

                                <?php else: ?>
                                0.00
                                <?php endif; ?>
                            </td>
                            <td>
                                <?php if($transaction->fine!=null || $transaction->fine!=null): ?>
                                <?php echo e($transaction->fine + $transaction->penaltyAmount + $transaction->chequeBounceCharge); ?>

                                <?php else: ?>
                                0.00
                                <?php endif; ?>
                            </td>
                            <td>
                               <?php $b = $feetotal + ($transaction->fine+$lesstransaction->fine) + ($transaction->penaltyAmount+$lesstransaction->penaltyAmount) + ($transaction->chequeBounceCharge+$lesstransaction->penaltyAmount) - ($transaction->discount+$lesstransaction->discount) - ($transaction->totalPaid+$lesstransaction->totalPaid); ?> <?php echo e($b); ?>

                            </td>
<!--                            <td>
                                <?php
                                $datewise_feeclass  = \App\BusFeehead::where('idStop', '=', $stdtransport->idStop)
                                        ->whereDate('toDate', '>=', today_date())
                                        ->select(DB::raw('SUM(amount) as feetotal'))
                                        ->first();

                               
                                $totalpaid = $transaction->totalPaid + $lesstransaction->totalPaid;
                                $unpaid = $datewise_feeclass->feeTotal;
                                $unpaiddue = $unpaid - $totalpaid;
                                ?>
                                <?php echo e($unpaiddue); ?>

                            </td>-->
                        </tr>
                        <?php endif; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </form>
            </div>
        </div>
    </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;
            });   
        }
    });
$(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>');
                    });
                }
            });
        }
});
$(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',
                exportOptions: {
                    columns: [0,1,2,3,4,5,6,7,8,9,10],
                    format: {
                     body: function (data, row, column, node ) {
                                if(column === 2 )
                                return "\0" + data ;
                                else if( column === 5 )
                                return data.replace( '<br>', '\r\n');
                                else return data;
                               
                                }
                            }
                }}
            
        ]
    });
});
$(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 - 2025 IMMREX7