<style>
.style15 
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
}
</style>

<script>
function pending_jobcard_print(url)
{	
onmouseover10= window.open(url,'onmouseover10','height=500,width=1100,scrollbars=no,resizable=no,left=50,top=50,toolbar=no,location=no,directories=no,status=no');	
}
</script>

<?php 
error_reporting(0);
include ("../../include/db.php");
?>

<style type="text/css">
.style1 {font-size: 16px}
</style>

<table width="100%">
<tr>
<td width="1%">&nbsp;</td>
<td width="7%" class="style15">&nbsp;</td> 
<td width="13%" align="center">&nbsp;</td>
<td width="1%">&nbsp;</td>
<td width="6%" class="style15">&nbsp;</td>
<td width="14%" align="center"  class="style15">&nbsp;</td>
<td width="2%">&nbsp;</td>
<td width="11%" class="style15">&nbsp;</td>
<td width="24%" align="left" >&nbsp;</td>
<td width="8%" align="center">&nbsp;</td>
<td width="2%"></td>
</tr>
</table>

<div class="row-fluid">
<div class="span12">
<div class="table-responsive">
<div class="CSSTableGenerator">  
<table width="99%" border="0" align="center"  cellpadding="0" cellspacing="0" style="border:2px solid #eaeaea;border:1px solid #ddd"  >
      <tr>
      <th height="25" align="center" style="border:1px solid #ddd" >S.No</th>
      <th scope="col" align="left" style="border:1px solid #ddd" >&nbsp;Date</th>
      <th width="154" align="left" style="border:1px solid #ddd" scope="col">&nbsp;&nbsp;Jobcard No</th>
      <th scope="col" align="left" style="border:1px solid #ddd" >Customer Name </th>
      <th width="162" align="left" scope="col" style="border:1px solid #ddd" >Job Created</th>
      <th width="152" align="left" scope="col" style="border:1px solid #ddd" >Style Name&nbsp;</th>
      <th width="152" align="left" scope="col" style="border:1px solid #ddd" >Printed Qty&nbsp;</th>

</tr>

  <?php
 include ("../../include/db.php");
 $from_date=$_GET['from_date'];
 $to_date=$_GET['to_date'];
 $current_date=date('Y-m-d');
 
if($from_date!=""){ $from_date1= "bill_date>='$from_date'"; }else{$from_date1="bill_date='$current_date'"; }
if($to_date!=""){ $to_date1 = "bill_date<='$to_date'";}else{$to_date1="bill_date='$current_date'";}
$all_value10 = $from_date1."@".$to_date1;
$all_array10 = explode('@',$all_value10);
foreach($all_array10 as $value10)
{ 
if($value10!='')
{
$get_query103 .= $value10." AND ";
}
}	  


 $sql="select * from deleted_production_main where  $get_query103 sno !='' order by bill_date ASC";
 
 //echo $sql;

    $rs=mysql_query($sql);
	$sno=0;
	$from=0;
   		while($rsdata=mysql_fetch_array($rs))
  			{
   				$sno=$sno+1;
				$from=$from+1;
   				$bill_date=$rsdata['bill_date'];
   				$job_card_no=$rsdata['job_card_no'];
	   			$cust_name=$rsdata['cust_name'];
	   			$job_created=$rsdata['job_created'];
				$style_no=$rsdata['style_no'];
				$printed_qty=$rsdata['printed_qty'];
	   			
  ?>
  <tr>
    <td width="55"  align="center" style="border:1px solid #ddd"><?php echo $from; ?></td>
    <td width="131" align="left" style="border:1px solid #ddd">&nbsp;&nbsp;<?php echo date("d-m-Y",strtotime($bill_date));?></td>
    <td align="left" style="border:1px solid #ddd">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $job_card_no;?></td>
    <td width="261" align="left" style="border:1px solid #ddd">&nbsp;&nbsp;<?php echo $cust_name;?></td>
    <td align="left" style="border:1px solid #ddd">&nbsp;&nbsp;<?php echo ucfirst($job_created);?></td>
    <td align="left" style="border:1px solid #ddd">&nbsp;<?php echo $style_no;?></td>
    <td align="right" style="border:1px solid #ddd">&nbsp;<?php echo number_format($printed_qty,2);?>&nbsp;&nbsp;</td>
 
    </tr>
  <?php $tot_print_qty+=$printed_qty; } ?>
  <tr>
   
    <td align="right" colspan="6" style="border:1px solid #ddd"><strong>Total&nbsp;</strong></td>
    <td align="right" style="border:1px solid #ddd"><strong><?php echo number_format($tot_print_qty,2);?></strong>&nbsp;&nbsp;</td> <?php if($_GET['status']!=1) { ?><?php } ?>
  </tr>
</table>
</div>
</div>
</div>
</div>