From: Maxime Bourget Date: Mon, 27 May 2013 14:43:10 +0000 (+0100) Subject: Adding item_schegule page. X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=1d0bb79c8f3fa4c1d1de231f8d162e04d16758f1;p=order_line_extra.git Adding item_schegule page. --- diff --git a/includes/order_lines.inc b/includes/order_lines.inc index 5102966..62613d1 100644 --- a/includes/order_lines.inc +++ b/includes/order_lines.inc @@ -73,6 +73,11 @@ function view_link($dummy, $order_no) return get_customer_trans_view_str(ST_SALESORDER, $order_no); } +function item_link($dummy, $stock_id) +{ + return pager_link( _($stock_id), + "/modules/order_line_extra/item_schedule.php?stock_id=" .$stock_id); +} function order_link($row) { diff --git a/item_schedule.php b/item_schedule.php new file mode 100644 index 0000000..6a7614f --- /dev/null +++ b/item_schedule.php @@ -0,0 +1,61 @@ + +. +***********************************************************************/ +$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_schedule.inc"); + +$page_security = 'SA_ORDERLINEX_EDIT'; +add_access_extensions(); + +$_SESSION['page_title'] = _($help_context = "Item schedule"); + + +$js = ""; +page($_SESSION['page_title'], false, false, "", $js); + +//--------------------------------------------------------------------------------------------- + +start_form(); + +start_table(TABLESTYLE_NOBORDER); +start_row(); + +if (isset($_GET['stock_id'])) +{ + $_POST['stock_id'] = $_GET['stock_id']; +} + +if (!@$_GET['popup']) + start_form(); + +if (!isset($_POST['stock_id'])) + $_POST['stock_id'] = get_global_stock_item(); + + stock_costable_items_list_cells(_("Item:"), 'stock_id', $_POST['stock_id']); + +end_row(); + +end_table(1); + +submit_center_first('Update', _("Update"), true, '', 'default', true); +submit_center_last('Cancel', _("Cancel"), true, '', 'cancel', true); + + end_form(); + end_page(); +?> diff --git a/order_lines_view.php b/order_lines_view.php index f85e3b5..11736d9 100644 --- a/order_lines_view.php +++ b/order_lines_view.php @@ -72,7 +72,7 @@ if($customer_id) { $cols = array( 'detail_id' => 'skip' , _("Order #") => array('fun'=>'view_link', 'ord' => '') - ,_("Item Code") => array('ord' => '') + ,_("Item Code") => array('ord' => '', 'fun' => 'item_link') ,_("Quantity") => array('type' => 'qty', 'dec' => 0) ,_("Required Date") => array('fun' => 'input_date_details', 'ord' => '') ,_("Comment") => array('fun' => 'input_comment_details', 'ord' => '')