<?php include("sass/icon_for_datepicker_and_datatable.php");?>
        
                
     <style type="text/css">
#sub3 {
display: none;
}
#sub4 {
display: none;
margin-top: 5px;
}
</style>
<script language="JavaScript">
function setPakSale(id) {
if(document.getElementById('bt2').value=='n'){
document.getElementById('bt2').value = 'n';
document.getElementById(id).style.display = 'none';
}else{
document.getElementById('bt2').value = 'y';
document.getElementById(id).style.display = 'inline';
}
} 
</script>

       
        
        
        <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>
                       <?php echo $company_name ; ?>
                        <small>Control panel</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                        <li class="active">supplier Setup</li>
                    </ol>
                </section>
                 <section class="content">
                 <!---Main Content--->
                 
                     <div class="row">
                     
                         
                         
                         <div class="col-md-12">
                         
                         
                         <div class="box">
                                <div class="box-header">
                                    <h3 class="box-title">Suppliers list with Due</h3>
                                </div><!-- /.box-header -->
                                <div class="box-body table-responsive">
                                    <table id="example1" class="table table-bordered table-striped">
                                        <thead>
                                            <tr>
                                                <th>Supplier Name</th>
                                                <th>Address</th>
                                                <th>Due</th>
                                                <th>Apply</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            
												<?php
                                                
                                                $query = "SELECT * FROM supplier_setup";
                                                $result = mysqli_query($connection,$query);
                                                
                                                $i=0;
                                                while($row=mysqli_fetch_array($result))
                                                {
                                                $i++;
                                                $supplier_setup_id = $row['supplier_id'];
                                                $supplier_name = $row['supplier_name'];
                                                $address = $row['address'];
                                                $district = $row['district'];
                                                $mobile_no = $row['mobile_no'];
												$opening_due = $row['opening_due'];
												$due = $row['due'];
		
				
				$due= $due + $opening_due ;
                                             
                                                echo "<tr>";
                                                echo "<td>$supplier_name
										<input type='hidden' id='supplier_name$i' value='$supplier_name'/></td>";
                                                echo "<td>$address
										<input type='hidden' id='address$i' value='$address'/></td>";
                                               
                                                echo "<td>$due
										<input type='hidden' id='due$i' value='$due'/></td>";
                                                echo "<td>
                                       <input type='hidden' id='zipsearch$i' value='$supplier_setup_id'/>
												<a href='sup_due_payment.php?supplier_setup_id=$supplier_setup_id'>  <button type='button' class='btn btn-success' ><i class='fa fa-dollar'></i> Due Payment</button></a>
												
												</td>";
                                                echo "</tr>";
												
												
					
												
                                                }
                                                
                                                ?>
                                         
                                        </tbody>
                                        <tfoot>
                                            <tr>
                                                <th>Supplier Name</th>
                                                <th>Address</th>
                                                <th>Due</th>
                                                <th>Apply</th>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div><!-- /.box-body -->
                            </div>
                         
                         </div>
                     
                     </div>
                 
        
                 
                 
                 </section>
                </aside>
                <!-- /.right-side -->
        </div><!-- ./wrapper -->

        <!-- add new calendar event modal -->
        


  <!-- jQuery 2.0.2 -->
        <?php include("sass/footer_for_datepicker_and_datatable.php");?>
    </body>
</html>