Location: PHPKode > projects > NOLA > invitemadd.php
<? include('includes/main.php'); ?>
<script language="JavaScript">
     function checkvalue() {
          if (document.mainform.priceunitsperstockunit.value==0) {
               document.mainform.priceunitsperstockunit.value=1;
          }
     }
</script>
<? //invitemadd.php
       echo texttitle('Item Add');
       echo '<form action="invitemadd1.php" method="post" name="mainform" ENCTYPE="multipart/form-data"><input type="hidden" name="nonprintable" value="1"><table><input type="hidden" name="MAX_FILE_SIZE" value="'.IMAGE_UPLOAD_SIZE_MAX.'">';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">Item Code:</td><td><input type="text" name="itemcode" size="30" maxlength="20"'.INC_TEXTBOX.'></td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">Description:</td><td><input type="text" name="description" size="30" maxlength="100"'.INC_TEXTBOX.'></td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">Category:</td><td><select name="categoryid"'.INC_TEXTBOX.'>';
       $recordSet = &$conn->Execute('select itemcategory.id, itemcategory.name from itemcategory where cancel=0 order by itemcategory.name');
       while (!$recordSet->EOF) {
          echo '<option value="'.$recordSet->fields[0].'">'.rtrim($recordSet->fields[1])."\n";
          $recordSet->MoveNext();
       };
       echo '</select></td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">Stock Unit:</td><td><select name="stockunitnameid"'.INC_TEXTBOX.'>';
       $recordSet = &$conn->Execute('select unitname.id, unitname.unitname from unitname order by unitname.unitname');
       while (!$recordSet->EOF) {
          echo '<option value="'.$recordSet->fields[0].'">'.rtrim($recordSet->fields[1])."\n";
          $recordSet->MoveNext();
       };
       echo '</select></td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">Price Unit:</td><td><select name="priceunitnameid"'.INC_TEXTBOX.'>';
       $recordSet = &$conn->Execute('select unitname.id, unitname.unitname from unitname order by unitname.unitname');
       while (!$recordSet->EOF) {
               echo '<option value="'.$recordSet->fields[0].'">'.rtrim($recordSet->fields[1])."\n";
               $recordSet->MoveNext();
       };
       echo '</select></td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">Weight / Price Unit:</td><td><input type="text" name="lbsperpriceunit" onchange="validatenum(this)" size="30" maxlength="10"'.INC_TEXTBOX.'></td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">Price Unit / Stock Unit:</td><td><input type="text" name="priceunitsperstockunit" onchange="validatenum(this)" size="30" maxlength="10" value="1"'.INC_TEXTBOX.'></td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">GL Inventory Account:</td><td><select name="inventoryglacctid"'.INC_TEXTBOX.'>';
       $recordSet = &$conn->Execute('select glaccount.id, glaccount.name, glaccount.description from glaccount where (companyid=0 or companyid='.sqlprep($companyid).') and accounttypeid>=10 and accounttypeid <20 order by glaccount.name');
       while (!$recordSet->EOF) {
          echo '<option value="'.$recordSet->fields[0].'">'.rtrim($recordSet->fields[1]).' - '.rtrim($recordSet->fields[2])."\n";
          $recordSet->MoveNext();
       };
       echo '</select></td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">GL Sales Account:</td><td><select name="salesglacctid"'.INC_TEXTBOX.'>';
       $recordSet = &$conn->Execute('select glaccount.id, glaccount.name, glaccount.description from glaccount where (companyid=0 or companyid='.sqlprep($active_company).') and accounttypeid>=50 and accounttypeid <60 order by glaccount.name');
       while (!$recordSet->EOF) {
             echo '<option value="'.$recordSet->fields[0].'">'.rtrim($recordSet->fields[1]).' - '.rtrim($recordSet->fields[2])."\n";
             $recordSet->MoveNext();
       };
       echo '</select></td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'" rowspan="2">Composite Item (such as a kit or catalog)</td>';
       echo '<td><input type="radio" name="composityesno" checked value="0"'.INC_TEXTBOX.'>No</td></tr><tr></tr>';
       echo '<tr><td></td><td><input type="radio" name="composityesno" value="1"'.INC_TEXTBOX.'>Yes</td></tr>';

       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">Description for Product Catalog:</td><td><textarea name="catalogdescription" rows="10" cols="50"'.INC_TEXTBOX.'></textarea></td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">URL/File for Product Sheet:</td><td><input type="file" name="catalogsheet"'.INC_TEXTBOX.'>';
       if (SOFTWARE_SHOW_DOCMGMT)  echo ' Add to Document Manager:&nbsp;<input type="checkbox" name="docmgmtdoc" value="1"'.INC_TEXTBOX.'>';
       echo '</td></tr>';
       echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">URL/File for Product Graphic:</td><td><input type="file" name="graphic"'.INC_TEXTBOX.'>';
       if (SOFTWARE_SHOW_DOCMGMT)  echo ' Add to Document Manager:&nbsp;<input type="checkbox" name="docmgmtgraphic" value="1"'.INC_TEXTBOX.'>';
       echo '</td></tr></table>';
       echo '<input type="submit" value="Add Item"></form>';

?>
<? include('includes/footer.php'); ?>
Return current item: NOLA