<body background="../forms/i.jpg">

<?php include("../../include/dbconnect.php");




// Get all _POST VALUES HERE..

foreach($_POST as $p=>$t)
{
	$_POST[$p] = trim($t);
}

$myGroup = $_POST['Group'];
// Get all _POST VALUES HERE..



foreach($_POST as $h=>$i)
{
	$_POST[$h] = trim($i);
}

$myTax = $_POST['Tax'];

foreach($_POST as $j=>$k)
{
	$_POST[$j] = trim($k);
}

$myType = $_POST['Type'];

foreach($_POST as $w=>$y)
{
	$_POST[$w] = trim($y);
}

$myBatch = $_POST['head'];

foreach($_POST as $w=>$y)
{
	$_POST[$w] = trim($y);
}

$myItem = $_POST['head2'];


foreach($_POST as $s=>$t)
{
	$_POST[$s] = trim($t);
}

$mySalesexp = $_POST['Salesexp'];



?>
<SCRIPT LANGUAGE="JavaScript" src="../../include/CalendarPopup.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
var cal = new CalendarPopup();
</SCRIPT>
<title>Receipt</title>
<body background="../../images/blater01.gif" topmargin=0>
<center> 
<table cellpadding=0 cellspacing=4 width=568>
  <tr> 
    <td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font face="Verdana, Arial, Helvetica, sans-serif"><b><b>Invoice Preparation </b></font></td>
  </tr>

</table>
<form  name='myform' method='POST' action='<?=$_SERVER['PHP_SELF']?>?custcode=<?=$custcode?>&gcode=<?=$gcode?>&ipno=<?=$ipno?>'>
<table border=0 cellpadding=3 cellspacing=4 width="568" bgcolor="#E6E6FF">

   <?php
 $invtype[0] = 'Credit';   
 $invtype[1]='CASH';


?>

<tr>

    <td width="103" height="31" align="left" ><strong><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif">Invoice Type</font></strong></td>
    <td><select name='Type' onChange="javascript:submit();" >
      <?php

   for($ind=0;$ind<count($invtype);$ind++)
    {
   
	if(isset($myType) && preg_match("/" . preg_quote($myType", '/') . "/",$invtype[$ind]))
	{
		echo "<option selected value=\"$invtype[$ind]\">$invtype[$ind]";
	}
	else{
		echo "<option value=\"$invtype[$ind]\">$invtype[$ind]";
	}
 }
?>
    </select></td>



<?

if($custcode == '0' and $myType=='Credit')
{
?>
<script language="javascript">
alert("Sorry..Customer with no Ledger Account, Credit Sales is not allowed");
</script>
<?
exit;
}

if($custcode > '0' and $myType=='Credit')
{

	$acresult = mysqli_query($conn,"select acctcode from acctmast where acctcode = '$custcode'") or die(mysqli_error());
	$acrow = mysqli_fetch_row($acresult);
	if(!is_array($acrow))
	{	
	?>
	<script language="javascript">
	alert("Customer don't have GL, Credit Sales is not allowed");
	</script>
	<?
	exit;
	}
	else
	{
		$bcode = $acrow[0];
	}
}




	$presult = mysqli_query($conn,"select name from billcustomer ") or die(mysqli_error());
	$prow = mysqli_fetch_row($presult);
?>


    <td width="103" height="31" align="left" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Customer Name</b></font></td>
    <td width="200"><?=$prow[0]?>   
    </td>

<tr>
    <td width="103" align="left"><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Discount % </b></font></td>
    <td width="200"><input type="text" onKeyPress="return event.keyCode!=13" name="discount" id="h2"  value='<?=$discount?>' readonly   onChange="javascript:submit();"></td>
	
 <?php
$bankQuery=mysqli_query($conn,"select taxtype, description, tax from salestax  where reserved_word != 'INPUT' order by description") or die(mysqli_error());
?>

    <td width="59" height="31" align="left" ><strong><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif">Sales Tax Type</font></strong></td>
    <td><select name='Tax' onChange="javascript:submit();" >
      <?php
    echo "<option selected value=\" 0\"> Select Tax Type";
    while($row = mysqli_fetch_row($bankQuery))
    {
   	$temp = $row[1].'&nbsp;' .$row[2].'%';
	if(isset($myTax) && preg_match("/" . preg_quote($myTax", '/') . "/", $row[0]))
	{
		echo "<option selected value=\"$row[0]\">$temp";
	}
	else{
		echo "<option value=\"$row[0]\">$temp";
	}
 }
?>
    </select></td>	
  </tr>
 
  
  </tr>
  <tr>
    <td width="59" height="31" align="left" ><strong><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif">Product Group</font></strong></td>
    <td><?
$stQuery = mysqli_query($conn," select catcode, category from prodcat where rf = 'F'  order by category")or die( mysqli_error() );
?>
        <select name='Group' onChange="javascript:submit();">
          <?
echo "<option selected value=\" 0\"> Select Group";
while($row = mysqli_fetch_row($stQuery))
{
	
	if(isset($myGroup) && preg_match("/" . preg_quote($myGroup", '/') . "/", $row[0]))
	{
		echo "<option selected value=\"$row[0]\">$row[1]";
	}
	else{
		echo "<option value=\"$row[0]\">$row[1]";
	}
}
?>
      </select></td>
      



    <td width="103" height="31" align="left" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Product</b></font></td>
    <td><select name='head2'  onChange="javascript:submit();">
      <?

	echo "<option selected value=\" 0\"> Item";
	$prodresult = mysqli_query($conn,"select prodcode,prodname,rate from product  where catcode = '$myGroup'  order by prodname  ") or die(mysqli_error());
	while($prow = mysqli_fetch_row($prodresult))
	{
	
	$temp = $prow[1].'('.$prow[2].')';
	if(isset($myItem) && preg_match("/" . preg_quote($myItem",$prow[0]))
	{
		echo "<option selected value=\"$prow[0]\">$temp";
	}
	else{
		echo "<option value=\"$prow[0]\">$temp";
	}		
		
	}
	?>
    </select>
    </td>

      
      </tr>

    
          
 

     <tr> 
    <td width="103" height="31" align="left" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Batch No & Qty</b></font></td>
    <td><select name='head'  onChange="javascript:submit();">
      <?

	echo "<option selected value=\" 0\"> Batch No";
	$prodresult = mysqli_query($conn,"select batch_no,sum(inqty),sum(outqty) from stktrans  where  acctcode = '$myItem' group by batch_no ") or die(mysqli_error());
	while($prow = mysqli_fetch_row($prodresult))
	{
		if($prow[1] - $prow[2] >0)
		{
			
			$qresult = mysqli_query($conn,"select sum(qty) from spurch where prodcode ='$myItem' and batch_no ='$myBatch' ") or die(mysqli_error());
			$qrow = mysqli_fetch_row($qresult);
			
			$qt = ($prow[1] - $prow[2]) - $qrow[0];
			$tmp = '&nbsp;B.No:'.$prow[0].'&nbsp;A.Qty&nbsp;'.$qt;
			if(isset($myBatch) && preg_match("/" . preg_quote($myBatch",$prow[0]))
			{
				echo "<option selected value=\"$prow[0]\">$tmp";
			}
			else{
				echo "<option value=\"$prow[0]\">$tmp";
			}		
				
	
		}
	}	
	?>
    </select>
	  </td>
	  
	  
<?

	$mresult = mysqli_query($conn,"select rate from product where prodcode = '$myItem' ") or die(mysqli_error());
	$mrow = mysqli_fetch_row($mresult);
	$rt = $mrow[0];

	$mresult = mysqli_query($conn,"select discount from buy where bcode  = '$custcode' ") or die(mysqli_error());
	$mrow = mysqli_fetch_row($mresult);
	$discount = $mrow[0];
	
	$kresult = mysqli_query($conn,"select tax from salestax where taxtype = '$myTax' ") or die(mysqli_error());
	$krow = mysqli_fetch_row($kresult);
	$ptax_percent = $krow[0];
	
	$rate = round(($rt - $rt*$discount/100)*100/(100+$ptax_percent),2);
?>
	  
	     <td width="59" align="left" colspan="2"><font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Input Tax: &nbsp;&nbsp;<?=$ptax_percent?>%</b></font></td> 
	  
  </tr>

 

<tr>
    <td width="59" align="left"><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Qty </b></font></td>
    <td width="162"><input name="qty"  type="text" onKeyPress="return event.keyCode!=13" id="h1"   value='0' ></td>
    <td width="103" align="left"><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Rate </b></font></td>
    <td width="200"><input type="text" onKeyPress="return event.keyCode!=13" name="rate1" id="h2"  value='<?=$rate?>' readonly ></td>
  </tr>
   
<?  /* 
	$prodresult = mysqli_query($conn,"select add_rate from prodcat  where catcode = '$myGroup'   ") or die(mysqli_error());
	$prow = mysqli_fetch_row($prodresult);
	$add_rate = $prow[0];
	if($add_rate == 'Yes')
	{
	?>
<tr>
    <td width="59" align="left"><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Stainer Rate </b></font></td>
    <td width="162"><input name="stainer_rate"  type="text" onKeyPress="return event.keyCode!=13" id="h1"   value='0' ></td>
    <td width="103" align="left"><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Colour </b></font></td>
    <td width="200"><input type="text" onKeyPress="return event.keyCode!=13" name="specification" id="h2"  value='' ></td>
  </tr>
  <?	
	} */
	?>	
   
  <input type="hidden"  name="amount" id="h3">
</table>
<table cellpading=0 cellspacing=10 width= 668>

<tr><td width="307" align="left"><blockquote><input type =submit name="Clear" value = "Clear" ></blockquote></td><td width="288" align="right">
 <blockquote>  <input type =submit name="refresh" value = "Refresh" ></blockquote></td><td width="307" align="left"><blockquote><input type =submit name="add" value = "Add" ></blockquote></td>

</table>

<?
if($Clear == 'Clear')
{
	mysqli_query($conn,"truncate spurch ") or die(mysqli_error());
}
if($accthead == '0' and $qty > 0)
{
?>
<script language="JavaScript">
alert("Select Product please");
</script>
<?
exit;
}




//ECHO "$discount";
if($add == 'Add' and $qty >0)
{


	if($myType== '0')
	{
		?>
		<script language="JavaScript">
		alert("Select Type of Sales Please..");
		</script>
		<?
		exit;
	}
	
	if($myTax== '0')
	{
		?>
		<script language="JavaScript">
		alert("Select type of Tax please..");
		</script>
		<?
		exit;
	}	
	
	$bresult = mysqli_query($conn,"select distinct bcode from spurch ") or die(mysqli_error());
	$brow = mysqli_fetch_row($bresult);
	if(is_array($brow))
	{
	if($brow[0] != $custcode)
	{
		?>
			<script language="JavaScript">
            alert("Selected Buyer  is wrong");
            </script>
            <?
            exit;
	}
	}
		
	$qresult = mysqli_query($conn,"select sum(inqty - outqty) from stktrans where acctcode ='$myItem' and batch_no = '$myBatch' ") or die(mysqli_error());
	$qrow = mysqli_fetch_row($qresult);
	$st1 = $qrow[0];

	$qresult = mysqli_query($conn,"select sum(qty) from spurch where prodcode ='$myItem' and batch_no = '$myBatch' ") or die(mysqli_error());
	$qrow = mysqli_fetch_row($qresult);
	$st2 = $qrow[0];
	$sqty = $st1 - $st2;
	
	if($sqty - $qty < 0)
	{
		?>
		<script language="JavaScript">
		alert("Sorry you can't issue more than stock..");
		</script>
		<?
		exit;	
	}

	
	$aresult1=mysqli_query($conn,"select taxtype, tax,cess from salestax where taxtype='$myTax'") or die(mysqli_error());
	$arow1 = mysqli_fetch_row($aresult1);
	$tax_type = $arow1[0];
	$tax_rate = $arow1[1];	
		
		$amount = $rate1 * $qty;
		$result = mysqli_query($conn,"insert into spurch values ( '$compcode','$custcode','$myItem', '$qty','$rate1','$myBatch', '$amount','$bags', '$discount','$tax_type','$tax_rate','$specification','$stainer_rate',  NULL)") or die(mysqli_error());

}


$bankQuery=mysqli_query($conn,"select acctcode,description from acctmast where reserved_word = 'SALESEXP' order by description") or die(mysqli_error());
?>

  <td width="74" height="31" align="left" ><strong><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Expense Type</font></strong></td>
<td> <SELECT name='Salesexp' onChange="javascript:submit();" >
<?php
    echo "<option selected value=\" 0\"> Select Expense Type";
    while($row = mysqli_fetch_row($bankQuery))
    {
   	$temp = $row[1];
	if(isset($mySalesexp) && preg_match("/" . preg_quote($mySalesexp", '/') . "/", $row[0]))
	{
		echo "<option selected value=\"$row[0]\">$temp";
	}
	else{
		echo "<option value=\"$row[0]\">$temp";
	}
 }
?>
    </SELECT></td>
  <td width="167"><input name="packing"  type="text"  value='<?=$packing?>' onChange="javascript:submit()"></td>



</tr>
</form>
 
<form name='myform2' method='POST' action='entry.php'  onsubmit="return check()" >


<script language="javascript">
function check()
{

if(myform2.inv_no.value=="")
	{
		alert("Please Enter Invoice No");
		myform2.inv_no.focus();
		return false;
	}	

if(myform2.invtype.value=="")
	{
		alert("Please Reselect the Invoice Type");
		myform2.invtype.focus();
		return false;
	}	


}
</script>
<?

$result = mysqli_query($conn,"select compcode from company  ") or die(mysqli_error());
$row = mysqli_fetch_row($result);
$compcode= $row[0];


if($packing>0)
{
	if($mySalesexp =='0')
	{
		?>
        <script language="javascript">
		alert("You have not opted Expense Type. Please select otherwise data won't be saved");
        </script>
        <?
	}
}
?>



<input type="hidden" name="bcode" value="<?=$custcode?>">
<input type="hidden" name="invtype" value="<?=$myType?>">
<input type="hidden" name="gcode" value="<?=$gcode?>">
<input type="hidden" name="ipno" value="<?=$ipno?>">

<input type="hidden" name="exp_accthead" value="<?=$mySalesexp?>">
<table width="670">
  <tr  bgcolor="#A4A4FF">

<td width="42" height="31" align="left" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Modify</b></font></td>
<td width="119" height="31" align="left" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Product Name</b></font></td>



<td width="35" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Qty &nbsp;</b></font></td>
<td width="47" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Rate &nbsp;</b></font></td>
<td width="67" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Discount % &nbsp;</b></font></td>
<td width="95" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Value</b></font></td>
<td width="95" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Value after Discount</b></font></td>
<td width="47" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Tax %</b></font></td>
<td width="60" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Tax amount</b></font></td>
<td width="118" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Amount</b></font></td>


<?



$gtotal = 0;
$result = mysqli_query($conn,"select * from spurch  order by record ") or die(mysqli_error());
while($row = mysqli_fetch_row($result))
{
	$compcode = $row[0];
	$bcode = $row[1];
	$accthead = $row[2];
	$qty = $row[3];
	$rate = $row[4];
	$batch_no = $row[5];	
	$amount = $row[6];
	$units = $row[7];
	$discount_percent = $row[8];
	$taxtype = $row[9];
	$tax_percent = $row[10];
	$specification = $row[11];
	$stainer_rate = $row[12];
	$record = $row[13];
	$rate = $rate + $stainer_rate;



	$value= round($qty * $rate,2);
	$taxable_value = round($value,2);
	//$disc_amt = round($value * $discount_percent /100,2);
	
	
	$taxamt = round($taxable_value * $tax_percent / 100,2);

	
	$amount=  $taxable_value + $taxamt; 
		


	$tottax = $tottax +$taxamt;
	$gtotal = $gtotal + $amount;

		$valuetot = $valuetot + $value;
		//$disctotal = $disctotal + $disc_amt;


	$bresult  = mysqli_query($conn,"select name from buy where bcode = '$bcode' ") or die(mysqli_error());
	$brow = mysqli_fetch_row($bresult);
	$bname = $brow[0];
	


	$bresult  = mysqli_query($conn,"select prodname from product where prodcode = '$accthead' ") or die(mysqli_error());
	$brow = mysqli_fetch_row($bresult);
	$pname = $brow[0];
	if($specification != "")
	{
		$pname = $pname.'&nbsp;('.$specification.')';
	}
	

?>



<tr  bgcolor="#D7D7FF">
<td width="42" height="31" align="left" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><a href = "peditview.php?record=<?echo($record);?>"><?echo($record);?></a></b></font></td>
<td width="119" height="31" align="left" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><?=$pname?></b></font></td>



<td width="35" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><? if($qty >0) echo $qty;?></b></font></td>
<td width="47" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><? if($rate >0) echo $rate;?></b></font></td>
<td width="67" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><? if($discount_percent >0) echo $discount_percent;?></b></font></td>
<td width="95" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><? if($value >0) echo $value;?></b></font></td>
<td width="95" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><? if($taxable_value >0) echo $taxable_value;?></b></font></td>
<td width="47" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><? if($tax_percent >0) echo $tax_percent;?></b></font></td>
<td width="60" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><?=$taxamt?></b></font></td>
<td width="118" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><? if($amount >0) echo $amount;?></b></font></td>

</tr>

<?
}












$bamt =  $gtotal+$packing ;

$billamt = round($bamt);
$diff = $billamt- $bamt;


?>

<input type="hidden" name="packing" value="<?=$packing?>">


<tr  bgcolor="#D7D7FF">
<td colspan="5"   align="right"><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Total </b></font></td>
<td width="60" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><?=number_format($valuetot,2,'.','')?></b></font></td>
<td width="60" height="31" align="right" ><font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><?=number_format($disctotal,2,'.','')?>(D)</b></font></td>
<td width="60" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b></b></font></td>

<td width="60" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><?=number_format($tottax,2,'.','')?></b></font></td>
<td width="118" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><?=number_format($gtotal,2,'.','')?></b></font></td>
</tr>

<tr  bgcolor="#D7D7FF">
<td colspan="9"   align="right"><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Other  Charges </b></font></td>
<td width="118" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><? if($packing>0) echo number_format($packing,2);?></b></font></td>
</tr> 






  <tr  bgcolor="#D7D7FF">
<td colspan="9"   align="right"><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Round off</b></font></td>
<td width="118" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><?=number_format($diff,2,'.','')?></b></font></td>
</tr>

  <tr  bgcolor="#D7D7FF">
<td colspan="9"   align="right"><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Net Amount </b></font></td>
<td width="118" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><?=number_format($billamt,2,'.','')?></b></font></td>
</tr>

</table>

<table border=0 cellpadding=3 cellspacing=4 width="667" bgcolor="#D9E0F9">

<? 

	$result = mysqli_query($conn,"select compcode from company  ") or die(mysqli_error());
	$row = mysqli_fetch_row($result);
	$compcode= $row[0];

	$aresult = mysqli_query($conn,"select account_year from branches ") or die(mysqli_error());
	$arow = mysqli_fetch_row($aresult);
	$account_year = $arow[0];
	

	  $billres = mysqli_query($conn,"select max(inv_no) from salesreg where  compcode = '$compcode' and account_year = '$account_year'   ") or die(mysqli_error());
  	  $sinvrow = mysqli_fetch_row($billres);
	  $inv_no = $sinvrow[0]+1;
	  ?>

		<tr > 
		<td width="97" height="31" align="left" ><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>Invoice  No
		&nbsp;</b></font></td>
		<td width="195" > <input type="text" onKeyPress="return event.keyCode!=13" name="inv_no" value= '<?=$inv_no?>' readonly >		</td>
	<td  align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>Invoice Date &nbsp;</b></font> </td>
		<td class="small_site_font_black" > 
		<?
		
		$today2=strftime ("%d/%m/%Y", mktime(0,0,0,date("m"),date("d"),date("Y"))); ?>
		<input name="today2" type="text" onKeyPress="return event.keyCode!=13" class="text_box_button" value="<?=$today2?>" size="10"   > 
		<a href="#" onClick="cal.select(document.myform2.today2,'anchor1','dd/MM/yyyy'); return false;"name="anchor1" id="anchor1"><img  src="../../images/cal.gif" border="0"></a>		</td>
		</tr>



        

<tr > 
    <td width="139" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Documents Through&nbsp;</b></font></td> <td width="145" > <input type="text" name="form20" value= "">
  </td>
  
    <td width="139" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Type of Sale 
    &nbsp;</b></font></td><td>
	<SELECT name='saletype' >
	
    <option value="VAT">VAT
	<option value="CFORM">C-FORM
	<option value="HFORM">H-FORM
	
      </SELECT> </td>
      
</tr>


<tr >   <td width="139" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Order Ref No:
    &nbsp;</b></font></td>
  <td width="145" > <input type="text" name="pur_no" value= ""> 
  </td>
  <td width="139" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Order Ref Date: 
    &nbsp;</b></font></td>
  <td width="145" > <input type="text" name="pur_date" value= ""> 
  </td>

</tr>
  

<tr >   <td width="139" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Mode of Transport: 
    &nbsp;</b></font></td>
  <td width="145" > <input type="text" name="vehicle_no" value= ""> 
  </td>
  <td width="139" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>
    &nbsp;</b></font></td>
  <td width="145" >  </td>

</tr>  
</table>

<table width = "667">
  <tr> 
    <td width = "284" align="right" ><font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Confirm</b></font></td>
    <td width="371"> <input type="radio"    onKeyPress="return event.keyCode!=13"   name="cnf" value = "No" checked> <font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>No 
    </b></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="radio"    onKeyPress="return event.keyCode!=13"   name="cnf" value = "Yes"> <font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Yes
      </b></font>&nbsp;</td>
  </tr> 


    <tr> 
      <td align="center" colspan="2"> <blockquote> <input type =submit name="submit" value = "Submit"></blockquote></td>
  </table>


<font size=1> 
<br><br><font size=1><center><a href= "index.html">Return to index page</center></font>
</font> 
