Fixed transaction date check message.
[fa-stable.git] / manufacturing / work_order_release.php
index 91db03bd9aa846b7b4897f69fa6d2d409d1a09d0..0e9273ed3a2c9790bdbdca7f87a91e3bf193e1d5 100644 (file)
@@ -1,7 +1,16 @@
 <?php
-
-$page_security = 10;
-$path_to_root="..";
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       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/gpl-3.0.html>.
+***********************************************************************/
+$page_security = 'SA_MANUFRELEASE';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/session.inc");
 
 include_once($path_to_root . "/includes/date_functions.inc");
@@ -11,9 +20,11 @@ include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
 
 $js = "";
+if ($use_popup_windows)
+       $js .= get_js_open_window(800, 500);
 if ($use_date_picker)
        $js .= get_js_date_picker();
-page(_("Work Order Release to Manufacturing"), false, false, "", $js);
+page(_($help_context = "Work Order Release to Manufacturing"), false, false, "", $js);
 
 if (isset($_GET["trans_no"]))
 {
@@ -56,12 +67,15 @@ if (isset($_POST['release']))
 {
        release_work_order($selected_id, $_POST['released_date'], $_POST['memo_']);
 
-       display_note(_("The work order has been released to manufacturing."));
+       display_notification(_("The work order has been released to manufacturing."));
 
-       hyperlink_no_params("search_work_orders.php", _("Select another work order"));
+    display_note(get_trans_view_str(ST_WORKORDER, $selected_id, _("View this Work Order")));
 
-       end_page();
+       hyperlink_no_params("search_work_orders.php", _("Select another &work order"));
+       br();
 
+       $Ajax->activate('_page_body');
+       end_page();
        exit;
 }
 
@@ -76,7 +90,7 @@ $_POST['memo_'] = "";
 
 if (can_process($myrow))
 {
-       start_table($table_style2);
+       start_table(TABLESTYLE2);
 
     label_row(_("Work Order #:"), $selected_id);
     label_row(_("Work Order Reference:"), $myrow["wo_ref"]);
@@ -87,7 +101,7 @@ if (can_process($myrow))
 
     end_table(1);
 
-    submit_center('release', _("Release Work Order"), true, '', false);
+    submit_center('release', _("Release Work Order"), true, '', 'default');
 
     hidden('selected_id', $selected_id);
     hidden('stock_id', $myrow['stock_id']);