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(900, 500);
-if ($use_date_picker)
+if (user_use_date_picker())
$js .= get_js_date_picker();
page(_($help_context = "Produce or Unassemble Finished Items From Work Order"), false, false, "", $js);
//--------------------------------------------------------------------------------------------------
-function can_process()
+function can_process($wo_details)
{
- global $wo_details, $SysPrefs, $Refs;
+ global $SysPrefs, $Refs;
if (!$Refs->is_valid($_POST['ref']))
{
}
elseif (!is_date_in_fiscalyear($_POST['date_']))
{
- display_error(_("The entered date is not in fiscal year."));
+ display_error(_("The entered date is out of fiscal year or is closed for further data entry."));
set_focus('date_');
return false;
}
//--------------------------------------------------------------------------------------------------
-if ((isset($_POST['Process']) || isset($_POST['ProcessAndClose'])) && can_process() == true)
+if ((isset($_POST['Process']) || isset($_POST['ProcessAndClose'])) && can_process($wo_details) == true)
{
$close_wo = 0;
end_page();
-?>
\ No newline at end of file