<?php
	$total = 0;
	foreach ($data->result() as $key => $value) {
		$total += $value->total;
?>
<tr>
	<td align="center"><?php echo ($key + 1);?></td>
	<td><?php echo $value->datetime;?></td>
	<td><?php echo $value->outlet_name;?></td>
	<td><?php echo $value->name;?></td>
	<td><?php echo $value->outlay_type_name;?></td>
	<td><?php echo $value->description;?></td>
	<td>
		<?php
			if (strlen($value->file_outlay) > 0) {
		?>
		<a href="<?php echo base_url().AZAPP.'assets/file_outlay/'.$value->file_outlay;?>" target="_blank"><button class="btn btn-info btn-xs" type="button"><i class="fa fa-file"></i> Lihat Bukti</button></a>
		<?php
			}
		?>
	</td>
	<td align="right"><?php echo az_thousand_separator($value->total);?></td>
</tr>
<?php
	}
?>
<tr>
	<tr>
		<td style="font-weight: bold;" colspan="7" align="right">TOTAL</td>
		<td style="font-weight: bold;" align="right"><?php echo az_thousand_separator($total);?></td>
	</tr>
</tr>