Merged changes from main branch up to 2.1.3.
[fa-stable.git] / sales / inquiry / sales_orders_view.php
index d0172b6c437998758888d4ae8ebb82a74377c720..6b1f3689801e33cf6316796b80313f313ade24d9 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 /**********************************************************************
     Copyright (C) FrontAccounting, LLC.
-       Released under the terms of the GNU Affero General Public License,
-       AGPL, as published by the Free Software Foundation, either version 
-       of the License, or (at your option) any later version.
+       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/agpl-3.0.html>.
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 $page_security = 2;
 $path_to_root="../..";
@@ -91,25 +91,25 @@ function prt_link($row)
 function edit_link($row) 
 {
   return pager_link( _("Edit"),
-    "/sales/sales_order_entry.php?" . SID . "ModifyOrderNumber=" . $row['order_no'], ICON_EDIT);
+    "/sales/sales_order_entry.php?ModifyOrderNumber=" . $row['order_no'], ICON_EDIT);
 }
 
 function dispatch_link($row)
 {
   return pager_link( _("Dispatch"),
-       "/sales/customer_delivery.php?" . SID . "OrderNumber=" .$row['order_no'], ICON_DOC);
+       "/sales/customer_delivery.php?OrderNumber=" .$row['order_no'], ICON_DOC);
 }
 
 function invoice_link($row)
 {
   return pager_link( _("Invoice"),
-       "/sales/sales_order_entry.php?" . SID . "NewInvoice=" .$row["order_no"], ICON_DOC);
+       "/sales/sales_order_entry.php?NewInvoice=" .$row["order_no"], ICON_DOC);
 }
 
 function delivery_link($row)
 {
   return pager_link( _("Delivery"),
-       "/sales/sales_order_entry.php?" . SID . "NewDelivery=" .$row['order_no'], ICON_DOC);
+       "/sales/sales_order_entry.php?NewDelivery=" .$row['order_no'], ICON_DOC);
 }
 
 function tmpl_checkbox($row)
@@ -140,7 +140,7 @@ $id = find_submit('_chgtpl');
 if ($id != -1)
        change_tpl_flag($id);
 
-if (isset($_POST['Update']) && isset($_POST['last']) {
+if (isset($_POST['Update']) && isset($_POST['last'])) {
        foreach($_POST['last'] as $id => $value)
                if ($value != check_value('chgtpl'.$id))
                        change_tpl_flag($id);
@@ -170,7 +170,7 @@ if (get_post('_OrderNumber_changed')) // enable/disable selection controls
        $Ajax->activate('orders_tbl');
 }
 
-start_form(false, false, $_SERVER['PHP_SELF'] .SID);
+start_form();
 
 start_table("class='tablestyle_noborder'");
 start_row();
@@ -184,7 +184,7 @@ locations_list_cells(_("Location:"), 'StockLocation', null, true);
 
 stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true);
 
-submit_cells('SearchOrders', _("Search"),'',_('Select documents'), true);
+submit_cells('SearchOrders', _("Search"),'',_('Select documents'), 'default');
 
 hidden('order_view_mode', $_POST['order_view_mode']);
 
@@ -261,7 +261,7 @@ $cols = array(
        _("Order #") => array('fun'=>'view_link'),
        _("Customer"),
        _("Branch"), 
-       _("Comments"),
+       _("Cust Order Ref"),
        _("Order Date") => 'date',
        _("Required By") =>array('type'=>'date', 'ord'=>''),
        _("Delivery To"), 
@@ -271,7 +271,7 @@ $cols = array(
 );
 
 if ($_POST['order_view_mode'] == 'OutstandingOnly') {
-       array_replace($cols, 3, 1, _("Cust Order Ref"));
+       //array_replace($cols, 3, 1, _("Cust Order Ref"));
        array_append($cols, array(array('insert'=>true, 'fun'=>'dispatch_link')));
 
 } elseif ($_POST['order_view_mode'] == 'InvoiceTemplates') {