<?php 
include "config.php";
error_reporting(0);
?>
<html>
<head>
  <title>Feenix</title>
  <style>
    th
    {
      font-size:24px;
    }
    td
    {
      font-size:20px;
      font-weight:bold;
    }
    .contentTable td {
      padding:15px;
    }
    .contentTable .paddingLeft{
      padding-left:40px;
    }
    .contentTable td:nth-child(1) {
      padding-top:35px;
    }
    .contentTable td:nth-child(2) {
      padding-top:35px;
    }
    .borderTop{
      border-top:2px solid black;
    }
    .borderLeft{
      border-left:2px solid black;
    }
    .borderBottom{
      border-bottom:2px solid black;
    }
    .borderRight{
      border-right:2px solid black;
    }
  </style>
</head>
<script>
  function enterkeypressed()
{
	//alert(event.keyCode);
	if(event.keyCode=='13'){ window.print(); }
}
</script>
<body onkeydown="enterkeypressed()" ontouchstart="window.print()">
<?php 
 $customer= $_GET['customer'];
 $sales = $_GET['sales'];
 $vehicle=$_GET['vehicle'];
 $delivery=$_GET['delivery'];
 $date_ori = $_GET['date'];
 $time_ori = $_GET['time'];
  $tkt = $_GET['ticketadd'];
 $mode_trans = $_GET['modetrans'];
 $quantity = $_GET['quantity'];
 $date_val = empty($date_ori) ? date_format(date_create(),"d-m-y") : date("d-m-Y", strtotime($date_ori));
 
  // echo"select * from customerdetails  where  code = '$customer' && status!='deleted'";
$cus=mysqli_query($connect,"select *,CURRENT_TIME() as time from customerdetails  where  code = '$customer' && status!='deleted'");
while($cusshow = mysqli_fetch_array($cus))
{
  $product = $_GET['product'];
$pro=mysqli_query($connect,"select * from productdetail where productcode = '$product'");
while($proshow = mysqli_fetch_array($pro))
{

 $fst=mysqli_query($connect,"select * from ticket where status !='deleted' and ticket = '$tkt'");
    while($fstshow = mysqli_fetch_array($fst))
    {
$tripno=$fstshow['tripno'];
  ?>
  <table width="100%" style="border:2px solid black">
  <tr style="border:2px solid red">
     <td width="100%" align="center" style="padding-left:10px;padding-bottom:10px"> <img src="image/logo.png" style="float:left;margin-top:2px;" width="130px">
     <font style="padding-top:200px;font-size:24px;"><br>YOGA SAND AND STONES COMPANY</font><br>
     <font style="margin-left:20px;font-size:16px;">No 4/5.1 Vadipatti,Kachakatti Main Road<br> <span style="margin-left:20px;">Thathampatti Village (P.o)
Vadipatti (T.k),Madurai-625 218</span> <br>
     
     <span style="margin-left:20px;margin-bottom:20px;"><b>Email: &nbsp;&nbsp;:sandsandstones@yogainfra.com</b></span>
   </font>
</td>
</tr>
  </table>
<table width="100%"  class="borderBottom borderLeft borderRight">
<tr>
<td width="30%" align="Center"> No : <?php echo $sales ?></td>
<td width="40%" align="Center">Delivery Sheet</td>
<td width="30%" align="Center">Date : <?php echo $date_val ?></td>
</tr>
</table>
<table width="100%" class="contentTable borderLeft borderRight" >
<tr>
<td width="50%" class="paddingLeft"align="left"> Vehicle No </td><td width="50%" align="left">:&nbsp;<?php echo $vehicle ?> </td></tr>
<tr><td width="50%" class="paddingLeft"align="left">Time</td><td width="50%" align="left">:&nbsp;<?php echo empty($time_ori) ? $cusshow['time'] : $time_ori ?></td></tr>
<tr><td width="50%" class="paddingLeft"align="left">Party Name </td><td width="50%" align="left">:&nbsp;<?php echo $cusshow['name'] ?></td></tr>
<tr><td width="50%" class="paddingLeft"align="left"> Material From</td><td width="50%" align="left">:&nbsp;<?php echo $delivery ?></td></tr>
<tr><td width="50%" class="paddingLeft"align="left">Trip Sheet.No</td><td width="50%" align="left">:&nbsp;<?php echo $tripno;?></td></tr>
<tr><td width="50%" class="paddingLeft"align="left">Delivery Place</td><td width="50%" align="left">:&nbsp;YOGA S&S</td></tr>
<tr><td width="50%" class="paddingLeft"align="left">Material</td><td width="50%" align="left">:&nbsp;<?php echo $proshow['productname'] ?></td></tr>
<tr><td width="50%" class="paddingLeft"align="left">Quantity</td><td width="50%" align="left">:&nbsp;<?php echo $quantity ?></td></tr>
</tr>

</table>
<table width="100%" class="borderLeft borderRight borderTop borderBottom">
<tr>
  <td width="50%" align='left' style="padding-top:100px">------------------------------------------<td>
<td width="50%" align='right' style="padding-top:100px" >-----------------------------------------<td>
</tr>
<tr>
  <td width="50%" align='left'>Customer Signature<td>
<td width="50%" align='right' >Authorized&nbsp;Signature<td>
</tr>
  </table>

  <?php
}}}
  ?>

</body>
</html>