<style type="text/css">
.style20 {
	font-family: Verdana;
	font-size: 12px;
}
.style5 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
.style3 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 13px;
}
.style10{ border-top:solid 1px; border-top-color:#999;}
.style11{ border-bottom:dashed 1px; border-bottom-color:#333333;}
.style4 {font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 13px;
}
.style23 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: bold;
}
.style27 {font-size: 12px}
.style28 {
	font-size: 16px;
	font-weight: bold;
}
.text {font-family: Verdana; font-size:13px;}
.style29 {	font-family: Verdana;
font-size: 14px;
}
.stylebottom
{
	border-right:1px solid #999;	
	border-bottom:1px solid #999;
}	
</style>

<?php 
  include ("../../include/db.php");
error_reporting(0);
ob_start();
session_start();
$session_branch=$_SESSION['branch'];
$session_user_type=$_SESSION['user_type'];
$branch_name=$_GET['branch_name'];


?>
<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"  >
<tr>
<td align="center" style="font-family:Baskerville, 'Palatino Linotype', Palatino, 'Century Schoolbook L', 'Times New Roman', serif; font-size:large"><strong>Pending JobCard Print</strong></td>
</tr>
</table>


&nbsp;
&nbsp;

<table width="99%" border="0" align="center"  cellpadding="0" cellspacing="0" style="border-top:dashed 1px; border-bottom:dashed 1px" >
      <tr>
      <th align="center" style="border-top:dashed 1px" >S.No</th>
      <th scope="col" align="left" style="border-top:dashed 1px" >&nbsp;Date</th>
      <th width="172" align="left" style="border-top:dashed 1px" scope="col">&nbsp;&nbsp;Jobcard No</th>
      <th scope="col" align="left" style="border-top:dashed 1px" >Customer Name</th>
      <th width="179" align="left" scope="col" style="border-top:dashed 1px" >Job Created</th>
      <th width="143" align="left" scope="col" style="border-top:dashed 1px" >Style No</th>
      <th width="157" align="right" scope="col" style="border-top:dashed 1px">Style Name&nbsp;</th>
      <th width="118" align="center" scope="col" style="border-top:dashed 1px">Printed Qty</th>
      </tr>
  <?php
  include ("../../include/db.php");
  
$from_date=$_GET['from_date'];
$to_date=$_GET['to_date'];
 $billing=$_GET['billing'];


$current_date=date('Y-m-d');

if(($from_date=='')&&($to_date==''))
{
	$sql="select * from printer_production_main where printer_status='1' and print_date='$current_date' union select * from fusing_production_main where printer_status='1' and print_date='$current_date'";
}
elseif(($from_date!='')&&($to_date!='')&&($billing==''))
{
	$sql="select * from printer_production_main where printer_status='1' and  print_date>='$from_date' and print_date<='$to_date'  union select * from fusing_production_main where printer_status='1' and  print_date>='$from_date' and print_date<='$to_date'";
}
else
{
	$sql="select * from printer_production_main where printer_status='1' and billed_status='$billing' and  print_date>='$from_date' and print_date<='$to_date' union select * from fusing_production_main where printer_status='1' and billed_status='$billing' and  print_date>='$from_date' and print_date<='$to_date' ";
}
//echo $sql;
    $rs=mysql_query($sql);
	$sno=0;
	$from=0;
   		while($rsdata=mysql_fetch_array($rs))
  			{
   				$sno=$sno+1;
				$from=$from+1;
   				$p_id=$rsdata['p_id'];
   				$job_card_no=$rsdata['job_card_no'];
				$print_date=$rsdata['print_date'];
	   			$cust_name=$rsdata['cust_name'];
	   			$job_created=$rsdata['job_created'];
				$cust_po=$rsdata['cust_po'];
	   			$style_no=$rsdata['style_no'];
	   			$style_name=$rsdata['style_name'];
				$combo=$rsdata['combo'];
	   			$printed_qty=$rsdata['printed_qty'];
				$billed_status=$rsdata['billed_status'];
			    $refer=$rsdata['refer'];
				
  ?>
  <tr>
    <td width="56"  align="center" style="border:1px solid #ddd"><?php echo $from; ?></td>
    <td width="117" align="left" style="border:1px solid #ddd">&nbsp;&nbsp;<?php echo date("d-m-Y",strtotime($print_date));?></td>
    <td align="left" style="border:1px solid #ddd">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $job_card_no;?></td>
    <td width="262" 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 $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"><?php echo $style_name;?>&nbsp;</td>
    <td align="center" style="border:1px solid #ddd"><?php echo number_format($printed_qty,3);?></td>
    
    </tr>
  <?php } ?>
</table>
</div>
&nbsp;
&nbsp;
<table width="100%">
<tr>
<td width="101">&nbsp;
</td>
<td width="897">&nbsp;

</td>
  <td width="331" align="center" style="font-family:Baskerville, 'Palatino Linotype', Palatino, 'Century Schoolbook L', 'Times New Roman', serif; font-size:14px;"> Printed Date: <?php echo date('d-m-y')?>
  </td>
  </tr>
  </table>
</div>
</div>
</div>
</div>
</div></div></div></div>
