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

<script>
function deleted_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>

<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="218" align="left" style="border:1px solid #ddd" scope="col">&nbsp;&nbsp;Jobcard Nos</th>
      <th scope="col" align="left" style="border:1px solid #ddd" >Customer Name</th>
       <th scope="col" align="left" style="border:1px solid #ddd" >Fabric Type</th>

      <th width="182" align="right" scope="col" style="border:1px solid #ddd" >Overall Value&nbsp;</th>
      <th width="175" align="right" scope="col" style="border:1px solid #ddd" >Net Total&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= "DATE_FORMAT(entry_date,'%Y-%m-%d')>='$from_date'"; }else{$from_date1="DATE_FORMAT(entry_date,'%Y-%m-%d')='$current_date'"; }
if($to_date!=""){ $to_date1 = "DATE_FORMAT(entry_date,'%Y-%m-%d')<='$to_date'";}else{$to_date1="DATE_FORMAT(entry_date,'%Y-%m-%d')='$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_jobcard where  $get_query103 main_id!='' order by main_id ASC";

    $rs=mysql_query($sql);
	$sno=0;
	$from=0;
   		while($rsdata=mysql_fetch_array($rs))
  			{
   				$sno=$sno+1;
				$from=$from+1;
   				$entry_date=$rsdata['entry_date'];
   				$job_card_no=$rsdata['jobcard_no'];
	   			$cust_name=$rsdata['cust_name'];
				$fabric_type=$rsdata['fabric_type'];

	   			$overall_value=$rsdata['overall_value'];
				$net_total=$rsdata['net_total'];
	   			
  ?>
  <tr>
    <td width="63"  align="center" style="border:1px solid #ddd"><?php echo $from; ?></td>
    <td width="171" align="left" style="border:1px solid #ddd">&nbsp;&nbsp;<?php echo date("d-m-Y",strtotime($entry_date));?></td>
    <td align="left" style="border:1px solid #ddd">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $job_card_no;?></td>
    <td width="320" align="left" style="border:1px solid #ddd">&nbsp;&nbsp;<?php echo $cust_name;?></td>
        <td width="196" align="left" style="border:1px solid #ddd">&nbsp;&nbsp;<?php echo $fabric_type;?></td>

    <td align="right" style="border:1px solid #ddd">&nbsp;&nbsp;<?php echo $overall_value;?>&nbsp;</td>
    <td align="right" style="border:1px solid #ddd">&nbsp;<?php echo $net_total;?>&nbsp;</td>
 
    </tr>
  <?php $tot_print_qty+=$net_total; } ?>
  <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></td>  </tr>
</table>
</div>
</div>
</div>
</div>