<?php include("sass/icon_for_datepicker_and_datatable.php");?>
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <?php include("sass/sidebar.php"); ?>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">                
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        Bank Pending List
                        <small>Control panel</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                        <li class="active">Bank Pending List</li>
                    </ol>
                </section>

               
                <section class="content">
                <table class="table table-hover">
                	<tr>  
                    	<th>Amount</th>
                        <th>Payment Type</th>
                        <th>Particular</th>
                        <th>Cheque No</th>
                        <th>Cheque Date</th>
                        <th>Accept</th>
                    </tr>
                    
                    <?php 
					
						$result_for_handover_dateover_list = mysqli_query($connection,"SELECT * FROM bank_statement WHERE date >= '2014-01-01' AND date <= '$todaydate' and status<>1 AND branch_id  = '$branch_id_for_header_user'");
	
	
			
	$i=0;		
while($row_list=mysqli_fetch_array($result_for_handover_dateover_list))
{
$i++ ;
	$bank_statement_id = $row_list['bank_statement_id'];

			 	$amount = $row_list['amount'];
				$payment_type = $row_list['payment_type'];
				$reason = $row_list['reason'];
				$cheque_no = $row_list['cheque_no'];
				$cheque_date = $row_list['cheque_date'];
				
				$result_for_user_list = mysqli_query($connection,"SELECT particulars FROM particulars WHERE particulars_id  = '$reason'");
		$test_for_user_list = mysqli_fetch_array($result_for_user_list);
				
				$particulars=$test_for_user_list['particulars'];

			
				echo "<tr>
                    	<td>$amount</td>
						<td>$payment_type</a></td>
						<td>$particulars</td>
						<td>$cheque_no</td>
						<td>$cheque_date</td>
						<td><button type='button' class='btn btn-success' data-toggle='modal' data-target='#myModal$i'><i class='fa fa-thumbs-up'></i>&nbsp; Accept</button> </td>
                    </tr>";

echo "<div class='modal fade' id='myModal$i' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>
  <div class='modal-dialog'>
    <div class='modal-content'>
      <div class='modal-header'>
        <button type='button' class='close' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>&times;</span></button>
        <h4 class='modal-title' id='myModalLabel'>Confirm</h4>
      </div>
      <div class='modal-body'>
    Are You sure you want to accept  $cheque_no ?
      </div>
      <div class='modal-footer'>
        <button type='button' class='btn btn-default' data-dismiss='modal'>No</button>
        <a href='accept_bank.php?bank_statement_id=$bank_statement_id'><button type='button' class='btn btn-success'>Yes</button></a>
      </div>
    </div>
  </div>
</div>";
						
				
			}
			
		
					
					
					
					?>
                    
                    
                </table>
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->

 <?php include("sass/footer_for_datepicker_and_datatable.php");?>
    </body>
</html>