<!-- include -->



<div class="page-header">
	<h3 class="page-title">
		<span class="page-title-icon bg-gradient-primary text-white mr-2">
			<i class="mdi mdi-details"></i>
		</span>
		Transfer History
	</h3>
</div>

<div class="row justify-content-center">

	<div class="col-12 grid-margin">

		<div class="card shadow border10">

			<div class="card-body">
				<h4 class="m-2 p-2">Sending  Blance</h4>

				<div class="table-responsive">
					<table id="datatable" class="table display">
						<thead>
						<tr>
							<th>
								#
							</th>
							<th>
								To Merchant
							</th>
							<th>
								Note
							</th>
							<th>
								Time
							</th>
							<th>
								Transfer Amount
							</th>

						</tr>
						</thead>
						<tbody>
						<?php $serial=1;$total_transaction=0; foreach($sendings as $sending):?>
							<tr>
								<?php $total_transaction+=$sending->amount?>
								<td><?= $serial++ ?></td>
								<td><?=$sending->username?></td>
								<td><?=$sending->note?></td>
								<td><?= date('Y-m-d h:i A', strtotime($sending->created_at)) ?></td>
								<td>৳ <?=number_format($sending->amount,2)?></td>
							</tr>

						<?php endforeach?>

						</tbody>
						<tr>
							<td></td>
							<td></td>
							<td></td>

							<td>Total Sending Amount</td>
							<td>৳ <?=number_format($total_transaction,2)?></td>

						</tr>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
<script>

	$(document).ready(function() {
		$('#datatable_print').DataTable({
			dom: 'Bfrtip',
			buttons: [{
				extend: 'print',
				className: 'btn btn-inverse-info btn-rounded btn-sm'
			}]
		});
	});
	$(document).ready(function() {
		$('.dataTable').DataTable();
	});


</script>
