<!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=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<script language="JavaScript" src="gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<?php

include('../include/db.php');
include('../include/session.php');		


		
$line_no  = $_GET['line_no'];
$i = $line_no;
$quantity = $_GET['quantity'];
$reserved = $_GET['reserved'];
$productName = 	$_GET['productName'];
$orderNo = 	 $_GET['OrderNoText'];
$saleId = $_GET['saleId']; 
$cancel = $reserved;





?>
<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>

 
<link href="../css/main.css" rel="stylesheet" type="text/css" />
</head>

<?php if  ($reserved==0) { ?><br />
<br />
<div id="coloredContainer2" ><div align="center">
	<label class="std">There is nothing to cancel</label><br />
<label class="std">Click OK to return to the order.</label><br />
<br /></div>
</div><br />
<br />

<div align="center">
<input name="button" type="button" id="button" class="imagebutton" onclick="MM_goToURL('parent','cancelOrder.php?OrderNoText=<?php echo $orderNo ?>&edit=0&cancel=0');return document.MM_returnValue" value="OK" />
</div>
<?php } else { ?>
<form action="cancelOrder.php" method="get" name="form1" target="_top" id="form1">
<body><table width="290" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="290">
    <p class="wizard3">
<label class="std"> Do you want to cancel the delivery of the balance for this product?</label><label class="std"><font color=red></font></label>
</p>

<p class="wizard3"><?php echo $productName ?> </p>
<p class="wizard3">
<label class="std">Quantity to cancel:&nbsp;&nbsp;&nbsp; <font size='3'> <?php echo $reserved ?></font></label></p></td>
  </tr>
  <tr>
    <td align="center"><input name="input" type="submit" value="Yes" class="imagebutton"  />
      <input name="button2" type="button" id="button2" class="imagebutton" onclick="MM_goToURL('parent','cancelOrder.php?OrderNoText=<?php echo $orderNo ?>&edit=0&cancel=0');return document.MM_returnValue" value="No" />
      <input name="OrderNoText" type="hidden" id="OrderNoText" value="<?php echo $orderNo ?>" />
      <input name="edit" type="hidden" id="edit" value="1" />
    <input name="saleId" type="hidden" id="saleId" value="<?php echo $saleId ?>" />
    <input name="cancel" type="hidden" id="cancel" value="<?php echo $cancel ?>" /></td>
  </tr>
</table>
</form>
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("ProductSelect","req","Please select a product.");
  frmvalidator.addValidation("QuantityText","req","Please enter the quantity.");
<?php } ?>    
    
    
   


  
</script>
</body>
</html>