Save/retrieve last document date.
[fa-stable.git] / sales / includes / ui / sales_order_ui.inc
index 3950e133273704262df9f8ee00ef64c3b4ca3a5d..6665f468cf631d1384609d55c8a7bbafdc6edc08 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>.
 ***********************************************************************/
 include_once($path_to_root . "/sales/includes/cart_class.inc");
 include_once($path_to_root . "/includes/manufacturing.inc");
@@ -375,8 +375,8 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group
                if (!isset($_POST['OrderDate']) || $_POST['OrderDate'] == "")
                        $_POST['OrderDate'] = $order->document_date;
 
-               date_row($date_text, 'OrderDate',
-                 _('Date of order receive'), null, 0, 0, 0, null, true);
+               date_row($date_text, 'OrderDate', _('Date of order receive'),
+                       $order->trans_no==0, 0, 0, 0, null, true);
                if (isset($_POST['_OrderDate_changed'])) {
                        if (!is_company_currency($order->customer_currency) 
                                && (get_base_sales_type()>0)) {
@@ -553,10 +553,9 @@ function display_delivery_details(&$order)
                        false, true);
                if (list_updated('Location'))
                        check_qoh($order);
-
+//             $_POST['delivery_date'] = get_post('delivery_date', $order->due_date);
                date_row($delname, 'delivery_date',
-                       $order->trans_type==30 ?  _('Enter requested day of delivery') : '', 
-                       $order->due_date, 0, 0, 0);
+                       $order->trans_type==30 ?  _('Enter requested day of delivery') : '');
                text_row(_("Deliver To:"), 'deliver_to', $order->deliver_to, 40, 40,
                        _('Additional identifier for delivery e.g. name of receiving person'));