<head>
<?php 
$page_name = "Stores-new item";
include ("../navigation/access.php");

if ($permission_num==1) {
	 
	?>
<?php
$_SESSION['store'] ="";
$_SESSION['sub_cat'] ="";
$_SESSION['productId'] ="";
$_SESSION['productName'] ="";
$_SESSION['accountNo'] ="";
$_SESSION['supplierName'] = "";
$_SESSION['deliveryNote'] = "";
$_SESSION['quantity'] = "";
$_SESSION['price'] = "";
$_SESSION['receiveDate']  = date('Y-m-d');
	 ?>
     
<!--jscript-->
<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
     
</head>
<?php include('../include/wait.php') ?>


<body onLoad="MM_showHideLayers('Production','','hide','Stores','','hide','wait','','hide'); <?php if ($_SESSION['category'] == "Production") { ?> MM_showHideLayers('Production','','show','wait','','hide'); <?php } ?> <?php if ($_SESSION['category'] == "Stores") { ?>  MM_showHideLayers('Stores','','show','wait','','hide'); <?php } ?> <?php $_SESSION['store_item_id'] ='';  $_SESSION['store_item_name'] =''; ?>" onFocus="MM_showHideLayers('wait','','hide');"  onBlur="MM_showHideLayers('wait','','hide');">
<form id="form1" name="form1" method="get" action="editWizbase.php">
  <table width=595 border="0" align="left" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
    <tr>
      <td width="525" align="left" ><div class="wizard_frame">
          <label class="label_std">Select a store: </label>
          <table width="600" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="484"><label class="label_std">
                  <input name="cat_group" type="radio" id="cat_group_0" onClick="MM_showHideLayers('Production','','show');MM_showHideLayers('Stores','','hide'); $('#sub_cat_group_1').attr('checked', false);" value="Direct materials" <?php if ($_SESSION['category']=="Direct materials") { echo "checked='checked' " ;} ?>>
                  Direct materials</label>
                <label class="label_std">
                  <input name="cat_group" type="radio" id="cat_group_1" onClick="MM_showHideLayers('Production','','hide');MM_showHideLayers('Stores','','show'); $('#sub_cat_group_1').attr('checked', false);" value="Stores" <?php if ($_SESSION['category']=="Stores") { echo "checked='checked' " ;} ?>>
                  Stores</label>
                <br></td>
              <td width="116"><label class="label_std">
                  <input name="cat_group" type="radio" id="cat_group_2" onClick="MM_showHideLayers('Production','','hide');MM_showHideLayers('Stores','','hide'); $('#sub_cat_group_1').attr('checked', true);" value="Old" <?php if ($_SESSION['category']=="old") { echo "checked='checked' " ;} ?>    >
                  Old</label></td>
            </tr>
          </table>
          <br>
          <table width="561" border="0" cellspacing="0" cellpadding="0" id="Production">
            <tr>
              <td height="31" colspan="3"><label class="label_std">Select a department:</label></td>
            </tr>
            <tr>
              <td width="166"><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="Timber" id="sub_cat_group_6" <?php if ($_SESSION['subCategory']=="Timber") { echo "checked='checked' " ;} ?> />
                  Timber</label></td>
              <td width="194"><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="Mitek" id="sub_cat_group_0" <?php if ($_SESSION['subCategory']=="Mitek") { echo "checked='checked' " ;}  ?> />
                  Mitek product</label></td>
              <td width="201"><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="Sundries" id="sub_cat_group_0" <?php if ($_SESSION['subCategory']=="Sundries") { echo "checked='checked' " ;}  ?> />
                  Sundries</label></td>
            </tr>
          </table>
          <table width="561" border="0" cellspacing="0" cellpadding="0" id="Stores">
            <tr>
              <td height="34" colspan="3"><label class="label_std">Select category:</label></td>
            </tr>
            <tr>
              <td width="167" height="34"><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="Tools" id="sub_cat_group_1" <?php if ($_SESSION['subCategory']=="Tools") { echo "checked='checked' " ;} ?> />
                  Tools</label></td>
              <td width="191"><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="Cleaning materials" id="sub_cat_group_7" <?php if ($_SESSION['subCategory']=="Cleaning materials") { echo "checked='checked' " ;} ?> />
                  Cleaning materials</label></td>
              <td width="203"><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="Welding and Engineering" id="sub_cat_group_3" <?php if ($_SESSION['subCategory']=="Welding and Engineering") { echo "checked='checked' " ;} ?>/>
                  Welding and Engineering</label></td>
            </tr>
            <tr>
              <td height="34"><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="PPE" id="sub_cat_group_9" <?php if ($_SESSION['subCategory']=="PPE") { echo "checked='checked' " ;}  ?> />
                  PPE</label>
                &nbsp;</td>
              <td><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="Consumables" id="sub_cat_group_4" <?php if ($_SESSION['subCategory']=="Consumables") { echo "checked='checked' " ;} ?> />
                  Consumables</label></td>
              <td><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="Machine spares" id="sub_cat_group_5" <?php if ($_SESSION['subCategory']=="Machine spares") { echo "checked='checked' " ;} ?>/>
                  Machine spares</label></td>
            </tr>
            <tr>
              <td height="35">&nbsp;</td>
              <td height="35"><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="Lubricants" id="sub_cat_group_2" <?php if ($_SESSION['subCategory']=="Lubricants") { echo "checked='checked' " ;} ?>/>
                  Lubricants</label></td>
              <td><label class="label_std">
                  <input type="radio" name="sub_cat_group" value="Fuel" id="sub_cat_group_8" <?php if ($_SESSION['subCategory']=="Fuel") { echo "checked='checked' " ;} ?> />
                </label>
                Fuel</td>
            </tr>
          </table>
          <br>
        </div></td>
    </tr>
    <tr>
      <td><table width="590" height="50" align="left" id="table_button_bar">
          <tr>
            <td width="117">&nbsp;</td>
            <td width="115"></td>
            <td width="99"><input name="p" type="hidden" id="p" value="1" />
              <input name="error" type="hidden" id="error" value="0" />
              <input name="s" type="hidden" id="s" value="1" /></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" tabindex="-1"/></td>
            <td width="110" align="left"><input type="submit" name="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; " /></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</div>
<!--form validation--> 
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("cat_group","selone","Please select a category.");
  frmvalidator.addValidation("sub_cat_group","selone","Please select a sub category.");
</script>
</div>
</body>
<?php } else { 
    $_SESSION['denied_return'] = "store/store_main.php";	?>
<body onLoad="accessdenied(); return false">
</body>
<?php }
?>
