Selecting the cancel button in confirming the voiding of document did not work properly.
authorJoe <unknown>
Sat, 5 Apr 2014 08:08:18 +0000 (10:08 +0200)
committerJoe <unknown>
Sat, 5 Apr 2014 08:08:18 +0000 (10:08 +0200)
sales/sales_order_entry.php

index 0511097a72198fd542850a882d868afe5bcc59e4..d893c5446ebc9b009297ec652b2b07b223f36b46 100644 (file)
@@ -729,7 +729,7 @@ if ($customer_error == "") {
        display_delivery_details($_SESSION['Items']);
        echo "</td></tr>";
        end_table(1);
-
+/*
        if ($_SESSION['Items']->trans_no == 0) {
 
                submit_center_first('ProcessOrder', $porder,
@@ -744,6 +744,25 @@ if ($customer_error == "") {
 
        submit_center_last('CancelOrder', $cancelorder,
           _('Cancels document entry or removes sales order when editing an old document'));
+*/        
+       if ($_SESSION['Items']->trans_no == 0) {
+
+               submit_center_first('ProcessOrder', $porder,
+                   _('Check entered data and save document'), 'default');
+               submit_center_last('CancelOrder', $cancelorder,
+                       _('Cancels document entry or removes sales order when editing an old document'), true);
+               submit_js_confirm('CancelOrder', _('You are about to void this Document.\nDo you want to continue?'));
+       } else {
+               submit_center_first('ProcessOrder', $corder,
+                   _('Validate changes and update document'), 'default');
+               submit_center_last('CancelOrder', $cancelorder,
+                       _('Cancels document entry or removes sales order when editing an old document'), true);
+               if ($_SESSION['Items']->trans_type==ST_SALESORDER)
+                       submit_js_confirm('CancelOrder', _('You are about to cancel undelivered part of this order.\nDo you want to continue?'));
+               else
+                       submit_js_confirm('CancelOrder', _('You are about to void this Document.\nDo you want to continue?'));
+       }
+
 } else {
        display_error($customer_error);
 }