X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fwork_order_release.php;h=10044b7b01f6f6542399bc5501cfe99b6f341063;hb=9145f42a983ab1e8119092c1bb225c060e29e97a;hp=b6d518aeb77a5484710896e37d55be1dbd8f3ade;hpb=3dc709543cc713810811d269a8b2ce035146a559;p=fa-stable.git diff --git a/manufacturing/work_order_release.php b/manufacturing/work_order_release.php index b6d518ae..10044b7b 100644 --- a/manufacturing/work_order_release.php +++ b/manufacturing/work_order_release.php @@ -9,8 +9,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 10; -$path_to_root=".."; +$page_security = 'SA_MANUFRELEASE'; +$path_to_root = ".."; include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); @@ -24,7 +24,7 @@ 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"])) { @@ -52,7 +52,10 @@ function can_process($myrow) } // make sure item has components - if (!has_bom($myrow['stock_id'])) + // We don't need to stop the user to release it if it's and advanced order. + // The user know what he is doing. + + if (!has_bom($myrow['stock_id']) && $myrow['type'] != WO_ADVANCED) { display_error(_("This Work Order cannot be released. The selected item to manufacture does not have a bom.")); set_focus('stock_id'); @@ -69,9 +72,10 @@ if (isset($_POST['release'])) display_notification(_("The work order has been released to manufacturing.")); - display_note(get_trans_view_str(systypes::work_order(), $selected_id, _("View this Work Order"))); + display_note(get_trans_view_str(ST_WORKORDER, $selected_id, _("View this Work Order"))); hyperlink_no_params("search_work_orders.php", _("Select another &work order")); + br(); $Ajax->activate('_page_body'); end_page(); @@ -89,7 +93,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"]); @@ -100,7 +104,7 @@ if (can_process($myrow)) end_table(1); - submit_center('release', _("Release Work Order"), true, '', true); + submit_center('release', _("Release Work Order"), true, '', 'default'); hidden('selected_id', $selected_id); hidden('stock_id', $myrow['stock_id']);