<!DOCTYPE html>
<html>
<head>
	<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
	<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
	<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
	<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
	<link href="assets/css/main.css" rel="stylesheet" type="text/css">
	<link href="assets/css/my-custom-styles.css" rel="stylesheet" type="text/css">
	<link href="css/jquery.toast.min.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" href="css/jquery-confirm.min.css">
	<meta charset="utf-8">
	<!------ Include the above in your HEAD tag ---------->
	<style>
	.invoice-title h2, .invoice-title h3 {
		display: inline-block;
	}

	.table > tbody > tr > .no-line {
		border-top: none;
	}

	.table > thead > tr > .no-line {
		border-bottom: none;
	}

	.table > tbody > tr > .thick-line {
		border-top: 2px solid;
	}
	</style>
	<meta charset="utf-8">
</head>
<body onafterprint="afterprint()">
	<div class="container">
		<div class="row">
			<div class="col-xs-12">
				<div class="invoice-title">
						<center><img src="img/printlogo.png"></center>
					<hr>
					<center><b style="font-size: x-large;"> <?php echo e(__('mylanguage.jamath_list')); ?> - <?php echo e($data['rectype']); ?></b></center>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">

<table id="mydatatable" class="table table-sorting table-striped table-hover table-bordered datatable">
	<thead>
		<tr>
			<th><?php echo e(__('mylanguage.slno')); ?></th>
			<?php /*<th>{{ __('mylanguage.grade') }}</th> */ ?>
			<th><?php echo e(__('mylanguage.member_id')); ?></th>
			<th><?php echo e(__('mylanguage.name')); ?></th>
			<?php /* <th>{{ __('mylanguage.dob') }}</th> */ ?>
			<th><?php echo e(__('mylanguage.Mobno')); ?></th>
			<th style="text-align: right;"><?php echo e(__('mylanguage.Total_amount')); ?></th>		
			<th style="text-align: right;"><?php echo e(__('mylanguage.Paid_amount')); ?></th>	
			<th style="text-align: right;"><?php echo e(__('mylanguage.balance_amount')); ?></th>
		</tr>
	</thead>
	<tbody>
		<?php  $i=1;
		$totalamt=0;
		$paidamt=0;
		?>
		<?php $__currentLoopData = $data['LoadJamathRecords']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $LoadJamathRec): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
		<?php
		$resaddr = unserialize($LoadJamathRec->cst_resaddress);
		$permaddr = unserialize($LoadJamathRec->cst_permaddress);
		?>
		<tr>
			<td> <?php echo $i; ?></td>
			<?php /*<td>{{$LoadJamathRec->grd_grade}}</a></td>*/ ?>
			<td><?php echo e($LoadJamathRec->grd_prefix); ?><?php echo e($LoadJamathRec->cst_code); ?></a></td>
			<td><?php echo e($LoadJamathRec->cst_name); ?> </td>
			<?php /* <td>{{date("d-m-Y",strtotime($LoadJamathRec->cst_dob))}}</td> */ ?>
			<td><?php echo e($resaddr[4]); ?></td>			
			<td style="text-align: right;" id="tot_<?php echo e($LoadJamathRec->cst_id); ?>"><?php echo e($LoadJamathRec->totalamt); ?></td>			
			<td style="text-align: right;" id="paid_<?php echo e($LoadJamathRec->cst_id); ?>"><?php echo e($LoadJamathRec->paidamt + $LoadJamathRec->advamt + $LoadJamathRec->prepayamt); ?></td>			
			<td style="text-align: right;" id="bal_<?php echo e($LoadJamathRec->cst_id); ?>"><?php echo e(($LoadJamathRec->totalamt) - ($LoadJamathRec->paidamt  + $LoadJamathRec->advamt + $LoadJamathRec->prepayamt )); ?></td>	
		</tr>
		<?php
		$totalamt = $totalamt + $LoadJamathRec->totalamt;
		$paidamt = $paidamt + $LoadJamathRec->paidamt;
		$i= $i+1;
		?>
		<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>	
		<tr>
			<th></th>
			<?php /*<th></th>*/ ?>
			<th></th>
			<th></th>
			<th>Total</th>
			<th style="text-align: right;" id="tbltotalamt"><?php echo $totalamt; ?></th>		
			<th style="text-align: right;" id="tblpaidamt"><?php echo $paidamt; ?></th>	
			<th style="text-align: right;" id="tblbalamt"><?php echo $totalamt - $paidamt; ?></th>					
		</tr>
	</tbody>
</table>
			</div>
		</div>
	</div>
</body>
<script>
$(document).ready(function()
{
	window.print();
});
function afterprint()
{
	window.close();
}
</script>
</html>