From: Joe Date: Sat, 5 Apr 2014 08:08:18 +0000 (+0200) Subject: Selecting the cancel button in confirming the voiding of document did not work properly. X-Git-Tag: 2.3-final~146 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=879a85f0d6bab6e938c816d6b6a615e18c6b2101;p=fa-stable.git Selecting the cancel button in confirming the voiding of document did not work properly. --- diff --git a/sales/sales_order_entry.php b/sales/sales_order_entry.php index 0511097a..d893c544 100644 --- a/sales/sales_order_entry.php +++ b/sales/sales_order_entry.php @@ -729,7 +729,7 @@ if ($customer_error == "") { display_delivery_details($_SESSION['Items']); echo ""; 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); }