IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Paid Data</strong></h2>
</div>
<div class="body table-responsive">
<form action="<?php echo e(url('/student/feepaid')); ?>" method= "get">
<div class="row">
<div class="col-sm-5">
<div class="row clearfix">
<div class="col-sm-4 form-control-label">
<label for="classname"><strong>Payable Mode</strong></label>
</div>
<div class="col-sm-6">
<div class="form-group">
<input type="radio" id="paymode1" name="paymode" value="full" <?php if($isFull == 'full'): ?> checked <?php endif; ?>>
<label for="paymode1">Plan A (Full Payment)</label><br>
<input type="radio" id="paymode2" name="paymode" value="installments" <?php if($isFull == 'installments'): ?> checked <?php endif; ?>>
<label for="paymode2">Plan B (Installment)</label><br>
</div>
</div>
<div class="col-sm-2">
<input class="btn btn-primary btn-round" type="submit" value="Change Now" style="background-color:black;color:white;"/>
</div>
</div>
</div>
</form>
<table class="table table-bordered table-striped table-hover dataTable js-exportable">
<thead>
<tr>
<th>Receipt No.</th>
<th>Date</th>
<th>Ec No.</th>
<th>Name</th>
<th>Father </th>
<th>Mobile</th>
<th>Class</th>
<th>Section</th>
<th>Payment Mode</th>
<th>Total Fee</th>
<th>Discount</th>
<th>Penalty</th>
<th>Paid</th>
<th>Balance</th>
<!--<th>Print</th>-->
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php $__currentLoopData = $transactions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<?php $student = \App\AdmEntry::where('idStudent', '=', $var->idStudent)->first();
if ($isFull == "full") {
$class_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
->where('idSection', '=', $student->idSection)
->where('idFinancialYear', '=', $student->idFinancialYear)
->where('studentCategory', '=', $student->studentType)
->where('feeheadName', 'LIKE', '%(Full Payment)')
->whereNull('idStudent');
// ->get();
$allcat_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
->where('idSection', '=', $student->idSection)
->where('studentCategory', '=', 'All')
->where('idFinancialYear', '=', $student->idFinancialYear)
->where('feeheadName', 'LIKE', '%(Full Payment)')
->whereNull('idStudent');
// ->get();
$feeheads = \DB::table('feeheads')->where('idStudent', '=', $student->idStudent)
->where('idFinancialYear', '=', $student->idFinancialYear)
->where('feeheadName', 'LIKE', '%(Full Payment)')
->union($class_feeheads)
->union($allcat_feeheads)
->orderBy('toDate')
->get();
$feetotal = $feeheads->sum('amount');
} else {
$class_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
->where('idSection', '=', $student->idSection)
->where('idFinancialYear', '=', $student->idFinancialYear)
->where('studentCategory', '=', $student->studentType)
->where('feeheadName', 'LIKE', '%Installment)')
->whereNull('idStudent');
// ->get();
$allcat_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
->where('idSection', '=', $student->idSection)
->where('studentCategory', '=', 'All')
->where('idFinancialYear', '=', $student->idFinancialYear)
->where('feeheadName', 'LIKE', '%Installment)')
->whereNull('idStudent');
// ->get();
$feeheads = \DB::table('feeheads')->where('idStudent', '=', $student->idStudent)
->where('idFinancialYear', '=', $student->idFinancialYear)
->where('feeheadName', 'LIKE', '%Installment)')
->union($class_feeheads)
->union($allcat_feeheads)
->orderBy('toDate')
->get();
$feetotal = $feeheads->sum('amount');
}
?>
<td><?php echo e($var->receiptNo); ?></td>
<td><?php echo e($var->paymentDate); ?></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($var->paymentMode); ?></td>
<td><?php echo e($feetotal); ?></td>
<td><?php echo e($var->discount); ?></td>
<td><?php echo e($var->penaltyAmount + $var->fine); ?></td>
<td><?php echo e($var->totalPaid); ?></td>
<td>
<?php
$tp = \App\StudentTransaction::where('idStudent','=',$var->idStudent)
->where('idFinancialYear','=',$var->idFinancialYear)
->select(DB::raw('SUM(excessAmountUsed) 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'))
->first();
$b = $feetotal + $tp->fine + $tp->penaltyAmount - $tp->discount - $tp->totalPaid;
?>
<?php echo e($b); ?>
</td>
<!--<td><a href="<?php echo e(url('school/stdtransaction/'.$var->idTransaction.'/print')); ?>" target="_blank" class="btn btn-sm btn-info">Re-Print</a></td>-->
</tr>
<?php $i++; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('students.student_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -