<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1>POS </h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Home</a></li>
              <li class="breadcrumb-item active">General Form</li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->	
	<section class="content">
      <div class="container-fluid">
        <div class="row">
          <!-- left column -->
          <div class="col-md-12">
            
            <div class="card card-info">
              <div class="card-header">
                <h3 class="card-title">Product List</h3>
              </div>
              <!-- /.card-header -->
              <!-- form start -->
           
           
		   
		   
		   
		     <div class="card">
              <div class="card-header">
                <h3 class="card-title">DataTable with default features</h3>
              </div>
              <!-- /.card-header -->
              <div class="card-body">
                <table id="example1" class="table table-bordered table-striped">
                  <thead>
                  <tr height='50'>
                    <th>Product name
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					
					</th>
                   
                    <th>Product size</th>
                    <th>Purchased Price</th>
                    <th>Selling Price</th>
					<th>TIN</th>
					  <th>ADDRESS</th>
					  <th>TEL</th>
                    <th>STATUS</th>
                
					<th>BUSINESS TYPE</th>
					<th>DAYS</th>
					 <th wid>Action</th>
                  </tr>
                  </thead>
                  <tbody>
                 
<?php	
	
  
				include"config.php";

$sql="select * from sell";
$result=mysqli_query($conn,$sql);

if(mysqli_num_rows($result)>0)
{
	while($row=mysqli_fetch_assoc($result))
	{
		$sell_date=$row['sell_date'];
		$dateOfBirth = date_create("$sell_date");
  $dateNow = date_create("now");
  $diffSinceBirth = date_diff($dateOfBirth, $dateNow);
  

  $tarehe=$diffSinceBirth->format("%a");	
	echo"
   <tr>
   
   
                     <td>". $row['product_name']."</td>
                    <td>". $row['customer_name']."</td>
                    <td>". $row['customer_tin']."</td>
                  <td>". $row['customer_name']."</td>
                   <td>". $row['customer_tin']."</td>
					<td>". $row['customer_address']."</td>
                    <td>". $row['customer_tel']."</td>
                    <td>". $row['receipt_no']."</td>
					 <td>". $row['business_type']."</td>
					 <td>". 
					 $tarehe
					 .
					 
					 "</td>
                  
					<td>
					<form action='update_to_do_details.php' method='post'>
					<input type='submit' class='btn btn-info' value='UPDATE' >
					<input type='hidden' name='hidden' value='".$row['sell_id']."'>
					</form>
					
				
					
					
					</td>
                   
</tr>
						";
}}
						?>
				 
				 
				 
				 
               
                     <tfoot>
                
					<tr>                    
				 <th>Product name
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					
					</th>
                 
                   <th>Product size</th>
                    <th>Purchased Price</th>
                    <th>Selling Price</th>
					<th>TIN</th>
					  <th>ADDRESS</th>
					  <th>TEL</th>
                    <th>STATUS</th>
                
					<th>BUSINESS TYPE</th>
					<th>DAYS </th>
					 <th wid>Action</th>
                  </tr>
                  </tfoot>
                </table>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->
      </div>
      <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
		   
		   
		   
		   
		   
		   
		   
		   
		   
                <!-- /.card-body -->
              
                <!-- /.card-footer -->
         
            </div>
            <!-- /.card -->

          </div>
          <!--/.col (left) -->
          <!-- right column -->
         
          <!--/.col (right) -->
        </div>
        <!-- /.row -->
      </div><!-- /.container-fluid -->
    </section>
	    <!-- /.content -->
  </div>    