<?php
	ob_start();


$veh_num='';
$sdate_12 ='';
$page='1';
include("include/config.php");
require_once "include/Database_functions.php";
$sqlObj=new sqlclass();
	
	$purchase_id =  $_REQUEST['str'];
		
	//echo "select * from cf_sales join cf_sales_sub on cf_sales.sales_id = cf_sales_sub.sale_id where cf_sales.sales_id = '$salesid'";
	
	?>
    <table width="100%" border="0" cellspacing="2" cellpadding="0">
    <tr>
    	 <td width="20%" align="left" valign="top" class="display-border-1"><strong>Serial No</strong></td>
          <?php  
           
			$sq_arr=mysql_query("select * from 	cf_oilpurchase  where pur_id = '$purchase_id' ");
			
				 
		  ?>            
            <td width="6%" align="left" valign="top" class="display-border-1"><strong>Qty</strong></td>
            <td width="6%" align="left" valign="top" class="display-border-1"><strong>Rate</strong></td>
            <td width="6%" align="left" valign="top" class="display-border-1"><strong>Total</strong></td>
            <td width="6%" align="left" valign="top" class="display-border-1"><strong>Date</strong></td>
                      
           
      </tr>
    
    	<?php  
		 $i=1;
		  while($rw = mysql_fetch_array($sq_arr))
		  {
		  ?>		  
		  <tr>
            <td  width="20%" align="left" valign="top" class="display-border-1"><?=$i?></td>
            <td  width="20%" align="left" valign="top" class="display-border-1"><?php echo $rw['pur_com_kg'];?></td>
            <td  width="20%" align="left" valign="top" class="display-border-1"><?php echo $rw['pur_tin_rate'];?></td>
            <td  width="20%" align="left" valign="top" class="display-border-1"><?php echo $rw['pur_com_total'];?></td>
            <td  width="20%" align="left" valign="top" class="display-border-1"><?php echo date(('d-m-Y'),strtotime($rw['pur_addate']));?></td>
          </tr><tr>
          <?php $i++;} 
		  ?>
		  
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
          </tr>
          <tr>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
            <td align="left" valign="top" class="display-border-1">&nbsp;</td>
          </tr>
         <?Php $sq_arr=mysql_query("select * from 	cf_oilpurchase  where pur_id = '$purchase_id' ");
			$rw1 = mysql_fetch_array($sq_arr); ?>
          <tr>
         
        <td colspan="19" align="right" valign="top" class="trip-font-3">
         <input type="hidden" name="grd_tot" value="<?=$rw1['pur_com_total']?>" class="input1">
        Grand Total : <strong><?=$rw1['pur_com_total']?></strong> </td>
        </tr>
        </table>
            
 	
	
 