projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PHP 8 doesnt support with imagettfbbox. Replaced with imageftbbox. By @kvvaradha.
[fa-stable.git]
/
manufacturing
/
work_order_release.php
diff --git
a/manufacturing/work_order_release.php
b/manufacturing/work_order_release.php
index ca72da7c980e73540e91d7dd0133827cbf6e106e..0f274fd83e9163d7a3b780b7f1ab2a9e8b622365 100644
(file)
--- a/
manufacturing/work_order_release.php
+++ b/
manufacturing/work_order_release.php
@@
-14,17
+14,16
@@
$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/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 = "";
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);
$js .= get_js_open_window(800, 500);
-if (
$use_date_picker
)
+if (
user_use_date_picker()
)
$js .= get_js_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"]))
{
if (isset($_GET["trans_no"]))
{
@@
-52,7
+51,10
@@
function can_process($myrow)
}
// make sure item has components
}
// 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');
{
display_error(_("This Work Order cannot be released. The selected item to manufacture does not have a bom."));
set_focus('stock_id');
@@
-69,9
+71,10
@@
if (isset($_POST['release']))
display_notification(_("The work order has been released to manufacturing."));
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"));
hyperlink_no_params("search_work_orders.php", _("Select another &work order"));
+ br();
$Ajax->activate('_page_body');
end_page();
$Ajax->activate('_page_body');
end_page();
@@
-89,7
+92,7
@@
$_POST['memo_'] = "";
if (can_process($myrow))
{
if (can_process($myrow))
{
- start_table(
$table_style
2);
+ start_table(
TABLESTYLE
2);
label_row(_("Work Order #:"), $selected_id);
label_row(_("Work Order Reference:"), $myrow["wo_ref"]);
label_row(_("Work Order #:"), $selected_id);
label_row(_("Work Order Reference:"), $myrow["wo_ref"]);
@@
-111,4
+114,3
@@
end_form();
end_page();
end_page();
-?>
\ No newline at end of file