X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fwork_order_add_finished.php;h=c9c7e6271133e40a0ab0cc16a986ed8133d7667a;hb=825a4b279d6af05322188299f6a3967d2562f1e9;hp=c23dc93f42ca7fe8977743f84c7fa11e27bf7311;hpb=37c97bdee7da1e140926a11d724d0e4fc0552bf0;p=fa-stable.git diff --git a/manufacturing/work_order_add_finished.php b/manufacturing/work_order_add_finished.php index c23dc93f..c9c7e627 100644 --- a/manufacturing/work_order_add_finished.php +++ b/manufacturing/work_order_add_finished.php @@ -50,6 +50,7 @@ if (isset($_GET['AddedID'])) display_note(print_link(_("Print the GL Journal Entries for this Work Order"), 702, $ar), 1); hyperlink_no_params("search_work_orders.php", _("Select another &Work Order to Process")); + br(); end_page(); exit; @@ -100,7 +101,7 @@ function can_process() } 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; } @@ -110,7 +111,13 @@ function can_process() set_focus('date_'); return false; } - + // don't produce more that required. Otherwise change the Work Order. + if (input_num('quantity') > ($wo_details["units_reqd"] - $wo_details["units_issued"])) + { + display_error(_("The production exceeds the quantity needed. Please change the Work Order.")); + set_focus('quantity'); + return false; + } // if unassembling we need to check the qoh if (($_POST['ProductionType'] == 0) && !$SysPrefs->allow_negative_stock()) { @@ -185,7 +192,7 @@ $dec = get_qty_dec($wo_details["stock_id"]); if (!isset($_POST['quantity']) || $_POST['quantity'] == '') $_POST['quantity'] = qty_format(max($wo_details["units_reqd"] - $wo_details["units_issued"], 0), $wo_details["stock_id"], $dec); -start_table($table_style2); +start_table(TABLESTYLE2); br(); ref_row(_("Reference:"), 'ref', '', $Refs->get_next(29));