 <style type="text/css">
<!--
.style4 {font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 13px;
}
.stylebottom
{
	border-right:1px solid #999;

	
	border-bottom:1px solid #999;
}	
-->
</style>
<div class="row-fluid">
<div class="span12">
<div class="table-responsive">
<div class="CSSTableGenerator">
<?php 
include ("../../include/db.php");
date_default_timezone_set('Asia/Kolkata');
error_reporting(0);
ob_start();
session_start();
$session_branch=$_SESSION['branch'];
$session_user_type=$_SESSION['user_type'];
$from_date=$_GET['from_date'];
$to_date=$_GET['to_date'];
$return_no=$_GET['return_no'];
$current_date=date('Y-m-d');

?>
<table border="0" width="800"  align="center" cellpadding="0" cellspacing="0"  >
<tr style="height:60">
<td width="159" height="106" align="right" style="font-size:12px;"><img src="../../img/logo_image.png" width="124" height="132"/></td>
<td colspan="6" align="center" valign="top" style=""><strong style="font-size: 30px; color: #06F; padding-top: 5px; width: 80px; font-family: Verdana, sans-serif">SRI AMMAN DIGITAL PRINTS</strong><br />
        <span width="80%" class="title1" style="font-size:14px;font-family:Verdana, sans-serif; font-weight:bold"><b></b> DOOR No: 1/2,1/3  KOMBAI THOTTAM MAIN ROAD,</span><br />
       <span width="80%" class="title0" style="font-size:14px;font-family:Verdana, sans-serif; font-weight:bold"><b></b>SELLANDIAMMAN THURAI ROAD,</span><br />
       <span width="80%" class="title0" style="font-size:14px;font-family:Verdana, sans-serif; font-weight:bold"><b></b>TIRUPPUR-641604 TAMILNADU STATE INDIA,</span><br/>
       <span width="80%" class="title00" style="font-size:14px;font-family:Verdana, sans-serif; font-weight:bold"><b></b>Contact Office: 0421-4355333,+91 83442-33555,+91 83442-33888,</span><br/>
       <span width="80%" class="title0" style="font-size:14px;font-family:Verdana, sans-serif; font-weight:bold"><b></b>Email Id : sriammandigitalprints@gmail.com/yahoo.com.</span><br/>
    
    <span width="80%" class="title1" style="font-size:18px;font-family:Verdana, sans-serif; font-weight:bold"><b></b>Empty Can DC Form Print</span></p></td>
  </tr>
<tr>
<td width="200" height="25" align="left" class="style4"><strong>From Date :</strong>  <?php if($_GET['from_date']==''){ echo $curdate=date('d-m-Y');} else { echo date("d-m-Y",strtotime($_GET['from_date']));}?></td>
<td  width="441" align="center" class="style4" scope="col"><strong>Empty Return No</strong>:<?php if($_GET['return_no']!=''){ echo $return_no;} else { echo "All";}?></td>
<td  width="200" align="right" class="style4" scope="col"><strong>To Date :</strong>  <?php if($_GET['to_date']==''){ echo $curdate=date('d-m-Y');} else { echo date("d-m-Y",strtotime($_GET['to_date'])); }?></td>
</tr>
</table>
<table border="0" width="800"  align="center" cellpadding="0" cellspacing="0" style="border-top:dashed 1px; border-bottom:dashed 1px;" >
<thead>
<tr>
    <th  align="center" height="30" style=" font-family:Verdana, sans-serif; font-size:12px; border-bottom:dashed 1px" width="47" >S.No</th>
    <th  align="left" style=" font-family:Verdana, sans-serif; font-size:12px; border-bottom:dashed 1px" >&nbsp;Date</th>
    <th width="108" style=" font-family:Verdana, sans-serif; font-size:12px; border-bottom:dashed 1px"  align="left"  >&nbsp;&nbsp;Empty Return No</th>
    <!--th  align="left" style=" font-family:Verdana, sans-serif; font-size:12px; border-bottom:dashed 1px" >Ref name</th-->
    <th  align="left" style=" font-family:Verdana, sans-serif; font-size:12px; border-bottom:dashed 1px"  >&nbsp;Packing Total</th>
    <th  align="right" style=" font-family:Verdana, sans-serif; font-size:12px; border-bottom:dashed 1px"  >Qty Total&nbsp;</th>
   
    </tr>
     <?php
include("../../include/db.php");  
ob_start();
session_start();

$show = 20;
$num_links = 19;
$from = $_GET['from'];
if (empty($from))
	 {
		$from = "0";
	 } 
else 
	{
	$html_query = $html_query. "&from=$from";
	}

$from_date=$_GET['from_date'];
$to_date=$_GET['to_date'];
$return_no=$_GET['return_no'];
$current_date=date('Y-m-d');
if($return_no!=""){ $return_no1= "empty_can_return_no='$return_no'"; }else{$return_no1=''; }
if($from_date!=""){ $from_date1= "create_date >='$from_date'"; }else{$from_date1="create_date='$current_date'"; }
if($to_date!=""){ $to_date1 = "create_date <='$to_date'";}else{$to_date1="create_date='$current_date'";}

$all_value10 = $from_date1."@".$to_date1."@".$return_no1;
$all_array10 = explode('@',$all_value10);
foreach($all_array10 as $value10)
{ 
if($value10!='')
{
$get_query102 .= $value10." AND ";
}
}
	
if(($from_date=='')&&($to_date==''))
  {
  $sql="select * from  empty_can_dc  order by id  ASC LIMIT $from,20";
  } 

else
  {
   $sql="select * from  empty_can_dc where $get_query102 	id!='' order by id ASC LIMIT $from,20";
  }

$rs=mysql_query($sql);
	$s_no=0;
   		while($rsdata=mysql_fetch_array($rs))
  			{
				 $s_no=$s_no+1;
                 $id=$rsdata['id'];
                 $empty_return_no=$rsdata['empty_can_return_no'];
				 $empty_can_time=$rsdata['empty_can_time'];
				 $create_date=$rsdata['create_date'];
				 $ref_name=$rsdata['ref_name'];
				 $pac_total=$rsdata['packing_total'];
				 $qty_total=$rsdata['qty_total'];
			
				 
 ?>

<tr>
    <td width="47"  height="30" align="center" style=" font-family:Verdana, sans-serif; font-size:12px;">&nbsp;<?php echo $s_no; ?></td>
     <?php $day=date("d-m-Y",strtotime($rsdata['empty_can_time'])); ?>
    <td width="118" align="left" style=" font-family:Verdana, sans-serif; font-size:12px;" >&nbsp; <?php echo $day; ?></td>
    <td width="168" align="left" style=" font-family:Verdana, sans-serif; font-size:12px;" >&nbsp;  <?php echo $empty_return_no; ?></td>
    <!--td width="110" align="left" style=" font-family:Verdana, sans-serif; font-size:12px;" >&nbsp;<-?php echo $ref_name; ?></td-->
    <td width="114" align="left" style=" font-family:Verdana, sans-serif; font-size:12px;" >&nbsp; <?php echo number_format($pac_total,2); ?></td>
    <td width="114" align="right" style=" font-family:Verdana, sans-serif; font-size:12px;" ><?php echo number_format($qty_total,2); ?>&nbsp;</td>
   
   </tr>
         <?php  $pac_tota+=$pac_total; 
              $qty_tota+=$qty_total;  } ?> 
  </thead>
</table>   
  
<table width="800" align="center">
<tr>
  <td style="border-bottom:dashed 1px;">&nbsp;</td>
  <td width="128" align="right" style="font-family:Verdana, sans-serif; font-size:14px; border-bottom:dashed 1px;"><b>Total</b>:</td>
  <td width="62" align="left" style="font-family:Verdana, sans-serif; font-size:14px; border-bottom:dashed 1px;"><?php echo number_format($pac_tota,2); ?></td>
  <td width="62" align="right" style="font-family:Verdana, sans-serif; font-size:14px; border-bottom:dashed 1px;"><?php echo number_format($qty_tota,2); ?></td>
</tr>
<tr>
<td width="59">&nbsp;</td>
<td colspan="3" align="right" style="font-family:Verdana, sans-serif; font-size:14px;"> <br>Printed Date : <?php echo $curdate=date('d-m-Y');?>&nbsp;&nbsp;&nbsp;&nbsp;<br>Printed Time : <?php echo $current_time=date('h:i:s A');?>&nbsp;&nbsp;<br>IP Address   : <?php echo $ip_address = $_SERVER['REMOTE_ADDR'];?>&nbsp;</td>
  </tr>
  </table>
<?php 
?>