<?php 
$query="SELECT * FROM ".$prefix2."order_vat_challan WHERE status=2";
$resultType=mysqli_query($linkid,$query);
?>
<div id="contentwrapper">
  <div class="main_content">
    <nav>
      <div id="jCrumbs" class="breadCrumb module">
        <ul>
          <li> <a href="#"><i class="icon-home"></i></a> </li>
          <li> <a href="#"> VAT Challan(Rear) Datagrid</a> </li>
        </ul>
      </div>
    </nav>
    <div class="row-fluid">
      <div class="span12">
        <h3 class="heading">VAT Challan(Rear)</h3>
        <table class="table table-striped table-bordered dTableR" id="dt_a">
          <thead>
            <tr>
              <th> Reference</th>
			  <th> Date</th>
              <th> Order# </th>
			  <th> Invoice# </th>
            </tr>
          </thead>
          <tbody>
            <?php 

			  if($resultType)

				{

				while($mydata = mysqli_fetch_assoc($resultType))

				{
				$challanid=$mydata['invoiceid'];

				$dateval=explode("-",$mydata['challan_date']);

			    $monthval=date("d M-Y",mktime(0,0,0,$dateval[1],$dateval[2],$dateval[0]));

				

			  ?>
            <tr class="bar<?php echo $mydata['id']?>" >
              <td><a href="vat-challan.php?id=<?php echo $challanid;?>" target="_blank"><?php echo $mydata['reference']?></a></td>
			  <td><?php echo $monthval;?></td>
			  <td><?php echo $mydata['order_no']?></td>
              <td><?php echo $mydata['invoiceid']?></td>
              
            </tr>
            <?php 

				 }

				 } 

?>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>
