. ***********************************************************************/ $path_to_root = "../.."; include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/ui/ui_lists.inc"); include_once($path_to_root . "/includes/ui/ui_globals.inc"); include_once($path_to_root . "/includes/ui/ui_input.inc"); include_once($path_to_root . "/reporting/includes/reporting.inc"); //include_once("includes/item_scheduler.inc"); include_once("hincludes/lib/php/Boot.class.php"); include_once("includes/db_order_lines.inc"); include_once("includes/picking.inc"); include_once("config.php"); $page_security = 'SA_ORDERLINEX_SCHEDULE'; add_access_extensions(); $_SESSION['page_title'] = _($help_context = "Item schedule"); $js = ""; page($_SESSION['page_title'], false, false, "", $js); //--------------------------------------------------------------------------------------------- div_start('item_schedule'); start_form(); start_table(TABLESTYLE_NOBORDER); start_row(); if (!isset($_POST['stock_id'])) { if (isset($_GET['stock_id'])) { $_POST['stock_id'] = $_GET['stock_id']; } else { $_POST['stock_id'] = get_global_stock_item(); } } if (list_updated('stock_id') || in_ajax()) $Ajax->activate('item_schedule') ; //else update_queue_quantities() && update_qoh_for_item(); //if (!@$_GET['popup']) // start_form(); stock_costable_items_list_cells(_("Item:"), 'stock_id', $_POST['stock_id']); // Needs to be done afterward as it can modify the post variable $stock_id = $_POST['stock_id']; end_row(); end_table(1); if(isset($stock_id)) echo ''; if(isset($_POST['Update'])) { $Ajax->activate('item_schedule'); // Restore the parameters $params = new ScheduleParameters($_SESSION['schedule_parameters']); $params->setMode('update'); } else if(isset($_POST['Cancel'])) { $Ajax->activate('item_schedule'); $params = new ScheduleParameters($_SESSION['schedule_parameters']); $params->setMode('cancel'); } else { $params = in_ajax() && $stock_id == @$_POST['last_stock_id'] ? new ScheduleParameters($_POST) : null; // save parameters form update $_SESSION['schedule_parameters'] = $_POST; } $scheduler = new ItemScheduler($stock_id, OrderXtraConfig::$default_location, $params); $scheduler->action(); print("

$stock_id

"); start_table(TABLESTYLE); $th = $scheduler->tableHeader(); table_header($th); $scheduler->generateTable(); end_table(); if($scheduler->needsUpdate()) { submit_center_first('Update', _("Update"), '', 'default', false); submit_center_last('Cancel', _("Cancel"), '', 'cancel', false); } end_form(); div_end(); end_page(); ?>