X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fmanage%2Fbom_edit.php;h=2df314090a9420c65b3bbec3435b44799eadaa6b;hb=0ddbffd3121056b6cf10dbd715d72d10fffdf253;hp=cfb15ad15acfd5044b7b4e0e97c669f5f8d80c2d;hpb=0ad7b92c6cf2e4e65ca0fa94ba31f30f7b292ba8;p=fa-stable.git diff --git a/manufacturing/manage/bom_edit.php b/manufacturing/manage/bom_edit.php index cfb15ad1..2df31409 100644 --- a/manufacturing/manage/bom_edit.php +++ b/manufacturing/manage/bom_edit.php @@ -86,7 +86,7 @@ function display_bom_items($selected_parent) global $table_style; $result = get_bom($selected_parent); - +div_start('bom'); start_table("$table_style width=60%"); $th = array(_("Code"), _("Description"), _("Location"), _("Work Centre"), _("Quantity"), _("Units"),'',''); @@ -110,6 +110,7 @@ function display_bom_items($selected_parent) } //END WHILE LIST LOOP end_table(); +div_end(); } //-------------------------------------------------------------------------------------------------- @@ -119,6 +120,7 @@ function on_submit($selected_parent, $selected_component=null) if (!check_num('quantity', 0)) { display_error(_("The quantity entered must be numeric and greater than zero.")); + set_focus('quantity'); return; } @@ -138,8 +140,8 @@ function on_submit($selected_parent, $selected_component=null) elseif (!isset($selected_component) && isset($selected_parent)) { - /*Selected component is null cos no item selected on first time round - so must be adding a record must be Submitting new entries in the new + /*Selected component is null cos no item selected on first time round + so must be adding a record must be Submitting new entries in the new component form */ //need to check not recursive bom component of itself! @@ -157,8 +159,8 @@ function on_submit($selected_parent, $selected_component=null) if (db_num_rows($result) == 0) { $sql = "INSERT INTO ".TB_PREF."bom (parent, component, workcentre_added, loc_code, quantity) - VALUES ('$selected_parent', '" . $_POST['component'] . "', '" - . $_POST['workcentre_added'] . "', '" . $_POST['loc_code'] . "', " + VALUES ('$selected_parent', '" . $_POST['component'] . "', '" + . $_POST['workcentre_added'] . "', '" . $_POST['loc_code'] . "', " . input_num('quantity') . ")"; db_query($sql,"check failed"); @@ -199,9 +201,12 @@ start_form(false, true); echo "