<div class="blocktitle">Revenue</div>
<div class="icspan12">
<?php 
	$total=0;
	foreach ($enrolltransactions as $grnttotal){
	
	?>

<?php $total=$total+$grnttotal['Enrolltransaction']['teacherFee'];}?>
<p style="font-size: 22px;font-weight: 900;padding: 10px;text-align: right;">Total: $<?php echo $total;?> </p>
<div class="table-responsive">
	<table cellpadding="0" cellspacing="0" class="table table-bordered">
	<tr>
			<th><?php echo $this->Paginator->sort('id'); ?></th>
			<th><?php echo $this->Paginator->sort('courseTitle'); ?></th>
			<th><?php echo $this->Paginator->sort('courseName'); ?></th>
			<th><?php echo $this->Paginator->sort('courseId'); ?></th>
			<th><?php echo $this->Paginator->sort('teacherFee','Amount'); ?></th>
	</tr>
	<?php 
		
		foreach ($enrolltransactions as $enrolltransaction): 
		
		?>
	<tr>
		<td><?php echo h($enrolltransaction['Enrolltransaction']['id']); ?>&nbsp;</td>
		<td><?php echo h($enrolltransaction['Enrolltransaction']['courseTitle']); ?>&nbsp;</td>
		<td><?php echo h($enrolltransaction['Enrolltransaction']['courseName']); ?>&nbsp;</td>
		<td><?php echo h($enrolltransaction['Enrolltransaction']['courseId']); ?>&nbsp;</td>
		<td><?php echo h($enrolltransaction['Enrolltransaction']['teacherFee']); ?>&nbsp;</td>
	</tr>
<?php 
	
	endforeach; ?>
	<tr>
		<td colspan="4" style="text-align: right;">Total</td>
		<td><?php echo '$'.$total;?></td>
	</tr>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>
	<div class="">
	<?php
		echo $this->Paginator->prev(' ' . __('previous'), array(), null, array('class' => 'prev disabled buttonc'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' ', array(), null, array('class' => 'next disabled buttonc'));
	?>
	</div>
</div>
</div>
