<?php
include '../include/header.php'; 

?>



<!-- Page wrapper  -->
        <div class="page-wrapper">
            <!-- Bread crumb -->
            <div class="row page-titles">
                <div class="col-md-5 align-self-center">
                     </div>
                <div class="col-md-7 align-self-center">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="javascript:void(0)">Home</a></li>
                        <li class="breadcrumb-item active">Billing terms</li>
                    </ol>
                </div>
            </div>
            <!-- End Bread crumb -->
            <!-- Container fluid  -->
            <div class="container-fluid">
                <!-- Start Page Content -->
                <div class="row">
                    <div class="col-12">
                        <div class="card">
                          
							
							

	
	<div class="card-body">
	<h3>Billing terms</h3>
	 <a href="add_billing_terms.php" class="btn btn-block btn-primary" name="add_ward" style="width:100px; float:right; margin-bottom:10px;">Add</a>
                              
                                <div class="table-responsive m-t-40">
                                    <table id="example23" class="display nowrap table table-hover table-striped table-bordered" cellspacing="0" width="100%">
                                        <thead>
                                            <tr>
                                              
					<th>#</th>
					<th>Billing Type</th>
					<th style="text-align:left">Terms</th>
					
					
                                            </tr>
                                        </thead>
                                        
                                        <tbody>
                                            <?php $i=1; ?>
				<?php
					
											
											$sqlww = "select *from tbl_billing_term_mstr";
						$resultww = $objhr->viewdata($sqlww);
				
				 if($resultww->num_rows > 0){
						while($rowsww = $resultww->fetch_assoc()){	 
						
						$term_mas_id = $rowsww['id'];
				
				 
					
						?>
				<tr>
					<td><?php echo $i++; ?></td>
					<td><?php echo $rowsww['type_of_billing']; ?></td>
					<td style="text-align:left"><?php $sql_tdet = "select *from tbl_billing_term_detail where bill_term_master_id = '$term_mas_id'";
						$result_tdet = $objhr->viewdata($sql_tdet);
						while($rows_tdet = $result_tdet->fetch_assoc()){
						echo $rows_tdet['serial_no'].')'.' '.$rows_tdet['terms'].'<br>';
						
						}
						 ?></td>
					
					
					
				
					
				</tr>
				<?php }}?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
	
	
							
							 </div>
                        </div>
                    </div>
                </div>
                <!-- End PAge Content -->
            </div>
            <!-- End Container fluid  -->



 
 
  
  <?php include '../include/footer.php'; ?>

							 <script src="../js/lib/datatables/datatables.min.js"></script>
    <script src="../js/lib/datatables/cdn.datatables.net/buttons/1.2.2/js/dataTables.buttons.min.js"></script>
    <script src="../js/lib/datatables/cdn.datatables.net/buttons/1.2.2/js/buttons.flash.min.js"></script>
    <script src="../js/lib/datatables/cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
    <script src="../js/lib/datatables/cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js"></script>
    <script src="../js/lib/datatables/cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js"></script>
    <script src="../js/lib/datatables/cdn.datatables.net/buttons/1.2.2/js/buttons.html5.min.js"></script>
    <script src="../js/lib/datatables/cdn.datatables.net/buttons/1.2.2/js/buttons.print.min.js"></script>
    <script src="../js/lib/datatables/datatables-init.js"></script>
	