


<?php $__env->startSection('breadcrumb'); ?>
   ##parent-placeholder-6e5ce570b4af9c70279294e1a958333ab1037c86##
   <li>report pelunasan customer</li>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('content'); ?>
   <div class="form-group">
   
		<label for="prd" class="col-md-1 control-label">Periode</label>
		<div class="col-md-2">
			<input id="awal" type="date" class="form-control" name="awal" autofocus required>
		</div>
		<div class="col-md-2">
			<input id="akhir" type="date" class="form-control" name="akhir" autofocus required>
		</div>

			<div class="col-md-5"> 
				<button type="button" class="btn btn-danger"  onclick="exportPDF()"><i class="fa fa-file-pdf-o"></i> Export PDF</button>&nbsp;&nbsp;
				<button type="button" class="btn btn-primary" onclick="reportLunas()"><i class="fa fa-table"></i> View Tabel </button>
			</div>
	</div>
<!-- </form> -->

<!------------------------------->
<br><br>
<table class="table table-striped table-padding table-bordered" id="tbl-lunas" style="background: #DCDCDC;" width="100%">   
<thead>
	<tr class="tblheader">
		<th width="5%">NO.</th>
		<th width="15%">Tanggal</th>
		<th width="40%">Customer</th>
		<th width="15%">BAYAR</th>
		<th width="15%">TYPE</th>
		<th width="10%">Pembulatan</th>
	</tr>
</thead>
<tbody></tbody>
</table>


<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>

<script type="text/javascript">
$(document).ready(function(){
var table, awal, akhir, cus, tbl_report;

})

function reportLunas(){
	
	$("#tbl-sale tbody tr").remove(); 
	
	awal=$('#awal').val();
	akhir=$('#akhir').val();

	tbl_report = $('#tbl-lunas').DataTable({
		"processing" : true,
		"scrollY": '58vh',
		"scrollCollapse": true,
		"paging": false,		
		"bSort": false,
		"destroy": true,
		"dom" : 'bti',	 
		"ajax" : {
			"url" : "<?php echo e(DIR_APP); ?>report/"+awal+"/"+akhir+"/pelunasan",
			"type": "GET"
		}
	}); 

 };
 

function exportPDF(){
	awal=$('#awal').val();
	akhir=$('#akhir').val();

	_url="<?php echo e(DIR_APP); ?>report/pelunasanpdf/"+awal+"/"+akhir+'"';
	window.open(_url,'_blank');		//open new tab
}

</script>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/myprojeq/public_html/wawan/resources/views/report/index_lunas.blade.php ENDPATH**/ ?>