<div style="top:2px;" class="panel-tools open">
<button data-toggle="dropdown" class="btn btn-blue dropdown-toggle" onClick="window.print()">
<i class="fa fa-print"></i>
</button>
</div>
<!--onLoad="window.print()"-->
<body >
	<?php $this->load->view("common/header"); ?>
	<style type="text/css">
.report_view_th{
	background-color:#428bca;
	color:#fff !important;
	font-size:12px;
	text-align:center;	
}
.table-responsive td{
	font-size:11px;	
}
h4{
	font-size:13px;
}
th{
	font-size:12px;
}
</style>
		

<div class="modal-header">

         

         
            <div class="modal-body">
            <p>Booking Report</p>
            


<div class="table-responsive">

<table class="table table-bordered table-hover table-striped print-table order-table">
<thead>
 <tr>
							                <th></th>
											  <th>Booking ID</th>
											  <th>Customer</th>
											  <th>Date</th>
											  <th>Time</th>
											  <th>Head Count</th>
                                               <th>Booking Status</th>
                                               <th>Amount</th>
                                               <th>Paid</th>
                                                <th>Balance</th>
                                              
							              </tr>
</thead>
<tbody>
 <?php 
 $tmpcount=0;
 $sub_bkng_tot_amount=0;
 $sub_paid=0;
 $sub_balance=0;
  foreach ($booking_data as $bk)
 {
	 $tmpcount++;
	 $sub_bkng_tot_amount+=$bk->bkng_tot_amount;
	 $paid=0;
	$paid=$this->Booking_Model->get_total_paid_by_booking_id($bk->bkng_id);
	$sub_paid+=$paid;
	
	$balance=0;
	$sub_balance+=$bk->bkng_tot_amount-$paid;
 ?>  
<tr>
<td style="text-align:right; width:40px; vertical-align:middle;"><?php echo sprintf("%03d",$tmpcount); ?></td>
<td><?php echo $bk->bkng_refno; ?></td>
<td><?php echo $bk->cus_name; ?></td>
<td><?php echo $bk->bkng_date; ?></td>
<td><?php echo $bk->bkng_time; ?></td>
<td><?php echo $bk->bkng_head_count; ?></td>
<td><?php echo $bk->bkng_status; ?></td>
<td><?php echo $bk->bkng_tot_amount; ?></td>
<td>
<?php 

echo number_format($paid, 2, '.', ','); ?></td>
<td><?php echo number_format($bk->bkng_tot_amount-$paid, 2, '.', ','); ?></td>
</tr>
<?php }?>
</tbody>
<tfoot>
 <tr>
    <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
       <td></td>
       <td><?php echo number_format($sub_bkng_tot_amount, 2, '.', ','); ?></td>
       <td><?php echo number_format($sub_paid, 2, '.', ','); ?></td>
        <td><?php echo number_format($sub_balance, 2, '.', ','); ?></td>
  </tr>
</tfoot>
</table>
</div>

<div class="row">
<div class="col-xs-12">
</div>
<div class="col-xs-5 pull-right">
<div class="well well-sm">
<p>
Created by:  <?php echo $this->session->userdata('ss_user_first_name'); ?> (<?php echo $this->session->userdata('ss_user_group_name'); ?>)</p> <p>
Date: <?php echo display_date_time_format(date("Y-m-d H:i:s")); ?> </p>
</div>
</div>
</div>

             
                 <!--/.col-md-12-->

</body>

