2 /**********************************************************************
3 Copyright (C) FrontAccounting, LLC.
4 Released under the terms of the GNU General Public License, GPL,
5 as published by the Free Software Foundation, either version 3
6 of the License, or (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 $path_to_root = "../..";
14 include_once($path_to_root . "/includes/db_pager.inc");
15 include_once($path_to_root . "/includes/session.inc");
16 include_once($path_to_root . "/sales/includes/sales_ui.inc");
17 include_once($path_to_root . "/reporting/includes/reporting.inc");
19 include_once("includes/order_lines.inc");
21 $page_security = 'SA_ORDERLINEX_EDIT';
22 add_access_extensions();
24 $_SESSION['page_title'] = _($help_context = "Edit lines extra parameters");
26 update_extra_order_details();
30 if ($use_popup_windows)
31 $js .= get_js_open_window(900, 600);
33 $js .= get_js_date_picker();
34 page($_SESSION['page_title'], false, false, "", $js);
36 //---------------------------------------------------------------------------------------------
40 start_table(TABLESTYLE_NOBORDER);
44 if(isset($_GET['customer_id']) && !isset($_POST['customer_id'])) $_POST['customer_id']=$_GET['customer_id'];
45 $customer_id = $_POST['customer_id'];
46 customer_list_cells(_("Select a customer: "), 'customer_id', $customer_id, true, true);
52 //submit_cells('SearchOrders', _("Search"),'',_('Select documents'), 'default');
58 //---------------------------------------------------------------------------------------------
59 // Orders inquiry table
62 $sql = get_order_details_extra($customer_id);
65 , _("Order #") => array('fun'=>'view_link', 'ord' => '')
66 ,_("Item Code") => array('ord' => '')
67 ,_("Quantity") => array('type' => 'qty')
68 ,_("Required Date") => array('fun' => 'input_date_details', 'ord' => '')
69 ,_("Comment") => array('fun' => 'input_comment_details', 'ord' => '')
73 $sql = get_order_summary();
75 'customer id' => 'skip',
76 _("Customer") => array('ord' => '', 'fun' => 'customer_link'),
77 _("Branch") => array('ord' => ''),
78 _("Delivery Date") => array('ord' => ''),
79 _("Quantity") => array('ord' => ''),
80 _("Amount") => array('ord' => '', 'type' => 'amount'),
81 _("required date") => array('ord' => '', 'type' => 'date'),
82 _("comment") => array('ord' => ''),
87 $table =& new_db_pager('orders_tbl', $sql, $cols);
89 $table->width = "80%";
91 display_db_pager($table);
94 submit_center_first('Update', _("Update"), true, '', 'default', true);
95 submit_center_last('Cancel', _("Cancel"), true, '', 'cancel', true);