} check_db_has_costable_items(_("There are no inventory items defined in the system (Purchased or manufactured items).")); //------------------------------------------------------------------------------------ if (isset($_GET['stock_id'])) { $_POST['stock_id'] = $_GET['stock_id']; } if (list_updated('stock_id')) { $Ajax->activate('show_heading'); $Ajax->activate('reorders'); } //------------------------------------------------------------------------------------ if (!@$_GET['popup']) { start_form(); } if (!isset($_POST['stock_id'])) { $_POST['stock_id'] = get_global_stock_item(); } if (!@$_GET['popup']) { echo "<center>" . _("Item:") . " "; echo stock_costable_items_list('stock_id', $_POST['stock_id'], false, true); echo "<hr></center>"; } else { br(2); } div_start('show_heading'); stock_item_heading($_POST['stock_id']); br(); div_end(); set_global_stock_item($_POST['stock_id']); div_start('reorders'); start_table(TABLESTYLE, "width=30%");
if (isset($_GET['Item'])) { $_POST['stock_id'] = $_GET['Item']; } if (!isset($_POST['curr_abrev'])) { $_POST['curr_abrev'] = get_company_currency(); } //--------------------------------------------------------------------------------------------------- start_form(false, true); if (!isset($_POST['stock_id'])) { $_POST['stock_id'] = get_global_stock_item(); } echo "<center>" . tr("Item:") . " "; stock_items_list('stock_id', $_POST['stock_id'], false, true); echo "<hr>"; // if stock sel has changed, clear the form if ($_POST['stock_id'] != get_global_stock_item()) { clear_data(); } set_global_stock_item($_POST['stock_id']); //---------------------------------------------------------------------------------------------------- function clear_data() { unset($_POST['PriceID']); unset($_POST['price']); unset($_POST['factor']); } //---------------------------------------------------------------------------------------------------- if (isset($_POST['updatePrice'])) { if (!check_num('price', 0) && !check_num('factor', 0)) { $input_error = 1; display_error(tr("The price entered must be numeric."));