X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fmanage%2Fbom_edit.php;h=2069f86b0e87386693dea066663082d137282173;hb=81a386367b29447ac372dbcd2c0b24cab27787b5;hp=559b79a29166ee2c2d3390c1264ece9753ca225e;hpb=bcbc8474ddfce8a67ad55266c23a9d49409aec95;p=fa-stable.git diff --git a/manufacturing/manage/bom_edit.php b/manufacturing/manage/bom_edit.php index 559b79a2..2069f86b 100644 --- a/manufacturing/manage/bom_edit.php +++ b/manufacturing/manage/bom_edit.php @@ -50,7 +50,7 @@ elseif (isset($_POST["selected_component"])) //-------------------------------------------------------------------------------------------------- -function check_for_recursive_bom($ultimate_parent, $component_to_check, $db) +function check_for_recursive_bom($ultimate_parent, $component_to_check) { /* returns true ie 1 if the bom contains the parent part as a component @@ -68,7 +68,7 @@ function check_for_recursive_bom($ultimate_parent, $component_to_check, $db) return 1; } - if (check_for_recursive_bom($ultimate_parent, $myrow[0], &$db)) + if (check_for_recursive_bom($ultimate_parent, $myrow[0])) { return 1; } @@ -116,8 +116,6 @@ function display_bom_items($selected_parent) function on_submit($selected_parent, $selected_component) { - global $db; - if (!is_numeric($_POST['quantity'])) { display_error(_("The quantity entered must be numeric.")); @@ -150,7 +148,7 @@ function on_submit($selected_parent, $selected_component) /*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! - If (!check_for_recursive_bom($selected_parent, $_POST['component'], &$db)) + If (!check_for_recursive_bom($selected_parent, $_POST['component'])) { /*Now check to see that the component is not already on the bom */