IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Collection Report</strong></h2>
</div>
<div class="body">
<?php echo Form::open(['method' => 'GET', 'action' => ['School\Library\ReportController@collectionReport'],'class' => 'form-horizontal']); ?>
<div class="row clearfix">
<div class="col-sm-2 form-control-label required">
<label for="classname">Member Type</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::select('type',['student'=>'Student','employee'=>'Staff'],null,['class' => 'form-control show-tick ms','required'=>'required']); ?>
</div>
</div>
<div class="col-sm-2">
<?php echo Form::submit('SHOW',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>
<?php echo Form::close(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if(isset($type) && $type == 'student'): ?>
<?php if(count($data)>=1): ?>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Collection Report</strong></h2>
</div>
<div class="body table-responsive">
<table class="table table-bordered table-striped table-hover js-basic-example dataTable">
<thead>
<tr>
<th>Receipt No</th>
<th>Date</th>
<th>Ec.No.</th>
<th>Accession No</th>
<th>Name</th>
<th>Father</th>
<th>Mobile</th>
<th>Class</th>
<th>Section</th>
<th>For</th>
<th>Payment Mode</th>
<th>Remarks</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<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->accessionNo); ?></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->bookStatus); ?></td>
<td><?php echo e($var->paymentMode); ?></td>
<td><?php echo e($var->remarks); ?></td>
<td>
<a href="<?php echo e(url('school/libtrans/'.$var->memberType.'/'.$var->idLibraryTransaction.'/print')); ?>" target="_blank" class="btn btn-sm btn-success">Print Receipt</a>
<button class="btn btn-raised btn-danger waves-effect btn-round js-sweetalert" data-id="<?php echo e($var->idLibraryTransaction); ?>" data-type="confirm">CANCEL</button>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if(isset($type) && $type == 'employee'): ?>
<?php if(count($data)>=1): ?>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Collection Report</strong></h2>
</div>
<div class="body table-responsive">
<table class="table table-bordered table-striped table-hover js-basic-example dataTable">
<thead>
<tr>
<th>Receipt No</th>
<th>Date</th>
<th>Ec.No.</th>
<th>Accession No</th>
<th>Name</th>
<th>Father</th>
<th>Mobile</th>
<th>Class</th>
<th>Section</th>
<th>For</th>
<th>Payment Mode</th>
<th>Remarks</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<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->accessionNo); ?></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->bookStatus); ?></td>
<td><?php echo e($var->paymentMode); ?></td>
<td><?php echo e($var->remarks); ?></td>
<td>
<a href="<?php echo e(url('school/libtrans/'.$var->memberType.'/'.$var->idLibraryTransaction.'/print')); ?>" target="_blank" class="btn btn-sm btn-success">Print Receipt</a>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(document).on('click', '.js-sweetalert', function (e) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
e.preventDefault();
var id = $(this).data('id');
swal({
title: "Are you sure?",
text: "Are You sure you want to delete this Receipt!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, Cancel it!",
closeOnConfirm: true
},
function() {
// console.log('here');
$.ajax({
type: "GET",
url: "<?php echo e(url('/school/libtrans/')); ?>" +"/"+ id +"/cancelreceipt",
})
.done(function(data) {
swal({
title: "Cancelled",
text: "Receipt has been successfully cancelled",
type: "success"
},function() {
location.reload();
});
})
.error(function(data) {
swal("Oops", "We couldn't connect to the server!", "error");
});
return false;
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('schools.school_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -