X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fwork_order_add_finished.php;h=acf67f73e197ef7e0621795772b40b17426a1893;hb=34bfbfad2dd0239174e03f7cce2b0bdcfa6a8a10;hp=953e863f7d0fecb5e3631bfdf1e6f703b2cd4808;hpb=d9b4de9d7e9d3ba77f6ece752fd6cc988effd8f1;p=fa-stable.git diff --git a/manufacturing/work_order_add_finished.php b/manufacturing/work_order_add_finished.php index 953e863f..acf67f73 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; @@ -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()) {