<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<table width="100%" border="1" cellspacing="0" cellpadding="3" style="border-collapse:collapse;">
  <tr>
    <th><strong>Sr No</strong></th>
    <th><strong>Branch</strong></th>
	 <th><strong>QC No </strong></th>
         <th><strong>QC Date</strong></th>
        <th><strong>Dispatch No </strong></th>
	<th><strong>Client</strong></th>
	<!--<th><strong>Item  Details</strong></th>-->
	<th><strong>Analysed By</strong></th>
    <th><strong>Remarks</strong></th>	
	<th><strong>Edit</strong></th>
  </tr>
  <?php
  $dissql=DB_query("select * from qc_predispatch where CompanyId='".$_SESSION['ACGCompanyId']."'
                   and date  BETWEEN '".$_SESSION['financialYrStart']."'   AND '".$_SESSION['financialYrEnd']."'",$db);
  $i=1;
  while($myrow1=DB_fetch_assoc($dissql)){
  	$myrow[]=$myrow1;
	}	
	
	if(!empty($myrow)){
	foreach ($myrow as $val){
  ?>
  <tr bgcolor="#FFFFFF">
  	<td ><?php echo $i; ?></td>
	<td><?php  echo  $s->getField('locations','loccode',$val['sitecode'],'locationname'); ?></td>
    <td><?php echo $val['qc_no'];?></td>
	<td><?php  echo ConvertSQLDate($val['date']); ?></td>
    <td><?php echo $s->getField('dispatch','id',$val['dipatch_id'],'adviceNo'); ?></td>
    <td><?php $client=$s->getField('dispatch','id',$val['dipatch_id'],'party'); echo  $s->getField('clientmaster','id',$client,'c_name'); ?></td>
	<!--<td><?php 	echo $s->getField('item_master','id',$val['mst_itemid'],'item_name');?></td>-->
	 <td><?php echo $val['analysed_by']?></td>
	  <td><?php echo $val['remarks']?></td>
	  <td><a href="index.php?route=QC/transactions/goods_incoming_inspection_edit&modid=<?php echo $_REQUEST['modid']  ?>&frmid=<?php echo $_REQUEST['frmid'] ?>&qid=<?php echo $val['id'] ?>"><img src="images/icon_edit.gif" /></a></td>
  </tr>
  <?php 
  $i++;}	}	
  else
  { ?>
  <tr>
  <td colspan="9"><h3 align="center"><strong>No Record Found</strong></h3></td>
  </tr>
  <?php 	
  }
  ?>
</table>


</body>
</html>
