<!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" />

<script language="JavaScript">
    <!--
    function submitForm(){
              document.form1.mySubmit.click();
    }
    -->
    </script>
  
<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<script language="javascript" src="../jscript/chainedselects.js"></script>
<script language="javascript"  src="../jscript/chainedselectconfig_receive.js"></script>

<style>
input.imagebutton{
	background-color:#E1E1E1;
	width: 100px;
	height: 24px;
	border:solid;
	border-width:1px;
	border-color:#FB6808;
	cursor:pointer;
	color:#000000;
	font:bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow:0px 0px 0px #CCC;
	-webkit-box-shadow:0px 0px 0px #CCC;
	box-shadow:0px 0px 0px #CCC;
	
}

input.imagebutton:hover{
	background-color:#E4E4E4;
	width: 100px;
	height: 24px;
	border:solid;
	border-width:2px;
	border-color:#FB6808;
	cursor:pointer;
	color:#000000;
	font:bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow:5px 5px 5px #666;
	-webkit-box-shadow:5px 5px 5px #666;
	box-shadow:5px 5px 5px #666;
	
}
</style>

<?php

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


;
$supply_line_id=$_GET['supply_line_id'];

$table_name = $_SESSION['db_prefix']."_supply_store_lines_temp";
$line_query = "SELECT store_item_id, quantity, price FROM $table_name WHERE supply_line_id = '".$supply_line_id."'  ";
$line_result = mySQL_query($line_query);
$store_item_id = mysql_result($line_result, 0, "store_item_id");
$quantity = mysql_result($line_result, 0, "quantity");
$price = mysql_result($line_result, 0, "price");

$table_name = $_SESSION['db_prefix']."_store_items";
$item_query = "SELECT item_name FROM $table_name WHERE store_item_id = '".$store_item_id."'  ";
$item_result = mySQL_query($item_query);
$item_name = mysql_result($item_result, 0, "item_name");

?>

<style>
label.label_std{
	margin-left:5px;
    line-height:20px;
	padding-top:6px;
    color:#000;
    text-shadow:1px 1px 1px #fff;
    font:bold 12px Arial;
}

input.imagebutton{
	background-color:#E1E1E1;
	width: 100px;
	height: 24px;
	border:solid;
	border-width:1px;
	border-color:#FB6808;
	cursor:pointer;
	color:#000000;
	font:bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow:0px 0px 0px #CCC;
	-webkit-box-shadow:0px 0px 0px #CCC;
	box-shadow:0px 0px 0px #CCC;
	
}
</style>


 


<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]+"'");
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
</script>
</head>
<body >

    
    <form action="../store/supplyOrderWizbase.php?p=2$s=" method="get" name="form2" target="_top" id="form2">
    <table width="450" border="0" align="left" cellpadding="0" cellspacing="0" class="list2" id="select_table">
    <tr>
      <td height="38" align="center"><span class="wizard_frame">
      <label class="label_std">You can only edit quantity and/or price for this item. If it is not the correct item, delete it from the list and select a new item. </label><br /><br />


        <label class="label_std" style="font-size:14px;"><?php echo $item_name?></label>
        <br />
        <br />
       
      </span></td>
    </tr>
    <tr>
      <td align="center"><label class="label_std">Quantity:&nbsp;
  <input name="quantity_text" type="text" id="quantity_text" size="15" onkeypress="return numbersonly(this, event)" value="<?php echo $quantity ?>"/>
      </label></td>
      </tr>
    <tr>
      <td align="center"><br />
        <input name="input" type="submit" value="Enter" class="imagebutton"  />
        <input name="button" type="button" id="button" class="imagebutton" onclick="MM_goToURL('parent','../store/supplyOrderWizbase.php?p=2&s=');return document.MM_returnValue" value="Cancel" />
        <input type="hidden" name="supply_line_id" id="supply_line_id" value="<?php echo $supply_line_id ?>" /> 
        <input type="hidden" name="p" id="p" value="2" />
        <input type="hidden" name="s" id="s" value="11>" /></td>
    </tr>
  </table>
</form>
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form2");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("quantity_text","req","Please enter quantity."); 
</script>
</body>
</html>