<title>Expense Report</title>

<p style="font-size:20px" align="center">Expense Report Between <?php echo e($from); ?> <small>To</small> <?php echo e($to); ?></p>


<table width="100%" cellspacing="0" cellpadding="0" border="1" style="text-align:center">

<tr>
<td><b>SNO</b></td>
<td><b>Narration</b></td>
<td><b>Amount</b></td>
<td><b>Date</b></td>
</tr>

<?php 
$i=0;
foreach($res as $row)
{
		
	//date added formate change					
	$d 	= strtotime($row->date_added);
	$od = date("d-M-y", $d);
	
	//count for total
	$totalArray[] = $row->amount;
	$i++;
?>
<tr>
<td><?php echo e($i); ?></td>
<td><?php echo e($row->narration); ?></td>
<td>Rs.<?php echo e($row->amount); ?></td>
<td><?php echo e($od); ?></td>
</tr>
<?php } ?>

<tr>
<td>&nbsp;</td>

<td><b>Total</b></td>
<td><b>Rs.<?php echo e(array_sum($totalArray)); ?></b></td>
<td>&nbsp;</td>

</tr>
</table>