X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fsales_order_entry.php;h=8805dfdac4473fb9d0fe7cb03e894d0ee32b70a7;hb=4c16d92ae1e1032f23e029d7d2f901a65a4223bc;hp=70ca31a4ca672e89ec55eb8554a1bfd38b07e4f2;hpb=b1c79afd0a78ec37ff813f1305e9e0804be78ef3;p=fa-stable.git diff --git a/sales/sales_order_entry.php b/sales/sales_order_entry.php index 70ca31a4..8805dfda 100644 --- a/sales/sales_order_entry.php +++ b/sales/sales_order_entry.php @@ -66,7 +66,6 @@ page($_SESSION['page_title'], false, false, "", $js); if (isset($_GET['AddedID'])) { $order_no = $_GET['AddedID']; - print_hidden_script(30); display_notification_centered(sprintf( _("Order # %d has been entered."),$order_no)); @@ -83,7 +82,6 @@ if (isset($_GET['AddedID'])) { } elseif (isset($_GET['UpdatedID'])) { $order_no = $_GET['UpdatedID']; - print_hidden_script(30); display_notification_centered(sprintf( _("Order # %d has been updated."),$order_no)); @@ -101,7 +99,6 @@ if (isset($_GET['AddedID'])) { } elseif (isset($_GET['AddedDN'])) { $delivery = $_GET['AddedDN']; - print_hidden_script(13); display_notification_centered(sprintf(_("Delivery # %d has been entered."),$delivery)); @@ -122,7 +119,6 @@ if (isset($_GET['AddedID'])) { } elseif (isset($_GET['AddedDI'])) { $invoice = $_GET['AddedDI']; - print_hidden_script(10); display_notification_centered(sprintf(_("Invoice # %d has been entered."),$invoice)); @@ -365,9 +361,8 @@ function handle_new_item() function handle_cancel_order() { - global $path_to_root; + global $path_to_root, $Ajax; - if ($_POST['CancelOrder'] != "") { if ($_SESSION['Items']->trans_type == 13) { display_note(_("Direct delivery entry has been cancelled as requested."), 1); @@ -381,19 +376,23 @@ function handle_cancel_order() if ($_SESSION['Items']->trans_no != 0) { if (sales_order_has_deliveries(key($_SESSION['Items']->trans_no))) display_error(_("This order cannot be cancelled because some of it has already been invoiced or dispatched. However, the line item quantities may be modified.")); - else + else { delete_sales_order(key($_SESSION['Items']->trans_no)); - } display_note(_("This sales order has been cancelled as requested."), 1); hyperlink_params($path_to_root . "/sales/sales_order_entry.php", _("Enter a New Sales Order"), SID . "&NewOrder=Yes"); + } + } else { + processing_end(); + meta_forward($path_to_root.'/index.php?application=orders'); } - processing_end(); - br(1); - end_page(); - exit; } + $Ajax->activate('_page_body'); + processing_end(); + br(1); + end_page(); + exit; } //--------------------------------------------------------------------------------