$Ajax->activate('_page_body'); } if (list_updated('stock_id')) { $Ajax->activate('price_table'); } //-------------------------------------------------------------------------------------------------- if (!@$_GET['popup']) { start_form(); } if (!isset($_POST['stock_id'])) { $_POST['stock_id'] = get_global_stock_item(); } if (!@$_GET['popup']) { echo "<center>" . _("Item:") . " "; //Chaitanya : All items can be purchased echo stock_items_list('stock_id', $_POST['stock_id'], false, true); //echo stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true); echo "<hr></center>"; } else { br(2); } set_global_stock_item($_POST['stock_id']); $mb_flag = get_mb_flag($_POST['stock_id']); if ($mb_flag == -1) { display_error(_("Entered item is not defined. Please re-enter.")); set_focus('stock_id'); } else { $result = get_items_purchasing_data($_POST['stock_id']); div_start('price_table'); if (db_num_rows($result) == 0) { display_note(_("There is no purchasing data set up for the part selected"));
function stock_purchasable_items_list_cells($label, $name, $selected_id = null, $all_option = false, $submit_on_change = false, $editkey = false) { $controls = stock_items_list($name, $selected_id, $all_option, $submit_on_change, array('where' => array("mb_flag!= 'M'"), 'editable' => 30, 'cells' => true), $editkey); View::get()->addComboControls($label, $controls); }