
<!--jscript-->


<?php
$store_register_id = 0;


//$table_name = $_SESSION['db_prefix']."_direct_return_lines_temp";
//$delete2_query = "DELETE FROM $table_name WHERE  user_name =  '".$_SESSION['username']."' "; 
//execsql($delete2_query);

//$table_name = $_SESSION['db_prefix']."_maintenance_job_lines";
//$store_item_query = "SELECT store_reg_id, store_item_id FROM $table_name WHERE maintenance_card_no = '".$_SESSION['maintenance_card_no']."'; "; //GROUP BY store_item_id HAVING SUM(delivered) > 0
//$store_item_result = execsql($store_item_query);
//$store_item_num = mysql_num_rows($store_item_result);

$table_name = $_SESSION['db_prefix']."_direct_return_lines_temp WHERE user_name = '".$_SESSION['username']."' AND store_item_id>0";
$line_query = "SELECT * FROM $table_name ";
$line_result = mySQL_query($line_query);
$line_num = mysql_num_rows($line_result);

$special_orders='no';
include('../include/store_item_select_header_no_price.php');

?>


<!--jscript-->
<script language="JavaScript" src="../jscript/numbers_only.js"  type="text/javascript"></script>  
<script language="JavaScript" src="../jscript/numbers_only_decimal.js"  type="text/javascript"></script>  


</head>

<?php include('../include/wait.php') ?>

<body onLoad="MM_showHideLayers('wait','','hide'); initCS(); " onFocus="MM_showHideLayers('wait','','hide');" >

<form id="form1" name="form1" method="get" action="direct_returnWizbase.php">
<div class="wizard_page_middle_frame">
<div class="wizard_frame" style="height:auto; min-height:240px;"><br>

<?php
$temp_table_name = $_SESSION['db_prefix']."_direct_return_lines_temp";  
include('../include/store_item_select_table_no_price.php');
?> 

</div>

 
  
<div class="wizard_frame">
  <table width="590" height="50" align="center" id="table_button_bar">
          <tr>
            <td width="117"><input type="button" name="lastprev_button" class="imagebutton" value="Prev" onClick="needToConfirm = false;MM_showHideLayers('wait','','show');MM_goToURL('parent','direct_returnWizbase.php?s=&amp;p=1'); return document.MM_returnValue; ;return document.MM_returnValue"/></td>
            <td width="115">&nbsp;</td>
            <td width="99"><span class="wizard">
              <input name="error" type="hidden" id="error" value="0" />
              <input name="p" type="hidden" id="p" value="2" />
              <input name="s" type="hidden" id="s" value="2" />
            </span></td>
            <td width="125" align="left"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false;  cancel_confirmation(1, '../store/store_main.php');;" value="Cancel" /></td>
            <td width="110" align="left"><input type="submit" name="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; MM_showHideLayers('wait','','show');" /></td>
          </tr>
      </table>
    </div>
  </div>
</form>
</div>

<!--form validation-->
  <script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
     
  for (i = 0; i < 20; i++) {
	frmvalidator.addValidation("store_item_text"+i,"req","- store item on store line 1-"+(i+1)+".");
	frmvalidator.addValidation("quantity_text"+i,"req","- quantity  on store line 1-"+(i+1)+".");
  	
  }

 for (j = 0; j < 20; j++) {
	frmvalidator.addValidation("item_text2"+j,"req","- store item on store line 2-"+(j+1)+".");
	frmvalidator.addValidation("order_text2"+j,"req","- order no on store line 2-"+(j+1)+".");
	frmvalidator.addValidation("quantity_text2"+j,"req","- quantity  on store line 2-"+(j+1)+".");
  	frmvalidator.addValidation("amount_text2"+j,"req","- price on store line 2-"+(j+1)+".");
}	
  </script>
</body>