Adding item_schegule page.
authorMaxime Bourget <bmx007@gmail.com>
Mon, 27 May 2013 14:43:10 +0000 (15:43 +0100)
committerMaxime Bourget <bmx007@gmail.com>
Mon, 27 May 2013 14:43:10 +0000 (15:43 +0100)
includes/order_lines.inc
item_schedule.php [new file with mode: 0644]
order_lines_view.php

index 5102966594bc05796c74359a72c4891626e0d741..62613d1028b3a1e473d370c29301a2eede7366f4 100644 (file)
@@ -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 (file)
index 0000000..6a7614f
--- /dev/null
@@ -0,0 +1,61 @@
+
+<?php
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
+$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();
+?>
index f85e3b56a10ab39ad342019cba5541c6b25269bd..11736d9c6de2249ab0dac378d7c6e4ed07877daa 100644 (file)
@@ -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' => '')