X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fwork_order_release.php;h=0f274fd83e9163d7a3b780b7f1ab2a9e8b622365;hb=3713324329f0ec2effe45febe79cb659ae13d5f6;hp=0e9273ed3a2c9790bdbdca7f87a91e3bf193e1d5;hpb=79f6e6f96a709611021434df0073e0d3f4ce5790;p=fa-stable.git diff --git a/manufacturing/work_order_release.php b/manufacturing/work_order_release.php index 0e9273ed..0f274fd8 100644 --- a/manufacturing/work_order_release.php +++ b/manufacturing/work_order_release.php @@ -14,15 +14,14 @@ $path_to_root = ".."; include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); -include_once($path_to_root . "/includes/manufacturing.inc"); 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) +if ($SysPrefs->use_popup_windows) $js .= get_js_open_window(800, 500); -if ($use_date_picker) +if (user_use_date_picker()) $js .= get_js_date_picker(); page(_($help_context = "Work Order Release to Manufacturing"), false, false, "", $js); @@ -52,7 +51,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'); @@ -112,4 +114,3 @@ end_form(); end_page(); -?> \ No newline at end of file