Code cleanup
[fa-stable.git] / sales / sales_order_entry.php
index 4d85035946d618611016c262871251a0f653d610..dfeb153279eccdc426ca84180ecf0f610f08942e 100644 (file)
@@ -232,7 +232,8 @@ function can_process() {
                set_focus('delivery_date');
                return false;
        }
-       if (date1_greater_date2($_SESSION['Items']->document_date, $_POST['delivery_date'])) {
+       //if (date1_greater_date2($_SESSION['Items']->document_date, $_POST['delivery_date'])) {
+       if (date1_greater_date2($_POST['OrderDate'], $_POST['delivery_date'])) {
                display_error(_("The requested delivery date is before the date of the order."));
                set_focus('delivery_date');
                return false;
@@ -302,7 +303,6 @@ function handle_update_item()
                 input_num('qty'), input_num('price'),
                 input_num('Disc') / 100 );
        }
-  copy_from_cart();
   line_start_focus();
 }
 
@@ -411,7 +411,7 @@ if (isset($_POST['UpdateItem']))
 if (isset($_POST['AddItem']))
        handle_new_item();
 
-if (isset($_POST['CancelItemChanges']) || isset($_POST['UpdateItem'])) {
+if (isset($_POST['CancelItemChanges'])) {
        line_start_focus();
 }