Mix location and order
[order_line_extra.git] / item_schedule.php
1
2 <?php
3 /**********************************************************************
4     Copyright (C) FrontAccounting, LLC.
5         Released under the terms of the GNU General Public License, GPL, 
6         as published by the Free Software Foundation, either version 3 
7         of the License, or (at your option) any later version.
8     This program is distributed in the hope that it will be useful,
9     but WITHOUT ANY WARRANTY; without even the implied warranty of
10     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
11     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
12 ***********************************************************************/
13 $path_to_root = "../..";
14
15 include_once($path_to_root . "/includes/session.inc");
16 include_once($path_to_root . "/includes/ui/ui_lists.inc");
17 include_once($path_to_root . "/includes/ui/ui_globals.inc");
18 include_once($path_to_root . "/includes/ui/ui_input.inc");
19 include_once($path_to_root . "/reporting/includes/reporting.inc");
20
21 //include_once("includes/item_scheduler.inc");
22 include_once("hincludes/lib/php/Boot.class.php");
23
24 $page_security = 'SA_ORDERLINEX_EDIT';
25 add_access_extensions();
26
27 $_SESSION['page_title'] = _($help_context = "Item schedule");
28
29
30 $js = "";
31 page($_SESSION['page_title'], false, false, "", $js);
32
33 //---------------------------------------------------------------------------------------------
34
35 start_form();
36
37 start_table(TABLESTYLE_NOBORDER);
38 start_row();
39
40 if (isset($_GET['stock_id']))
41 {
42         $_POST['stock_id'] = $_GET['stock_id'];
43 }
44
45 //if (!@$_GET['popup'])
46         start_form();
47
48 if (!isset($_POST['stock_id']))
49         $_POST['stock_id'] = get_global_stock_item();
50
51 $stock_id = $_POST['stock_id'];
52         stock_costable_items_list_cells(_("Item:"), 'stock_id', $stock_id);
53
54 end_row();
55 end_table(1);
56
57 $scheduler = new ItemScheduler($stock_id, 'DEF');
58
59 div_start('item_schedule');
60 start_table(TABLESTYLE);
61 $th = $scheduler->tableHeader();
62
63 table_header($th);
64
65 $scheduler->generateTable();
66
67 end_table();
68 div_end();
69
70
71 submit_center_first('Update', _("Update"), true, '', 'default', true);
72 submit_center_last('Cancel', _("Cancel"), true, '', 'cancel', true);
73
74
75
76 end_form();
77 end_page();
78 ?>