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!
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");
echo "<center>" . _("Select a manufacturable item:") . " ";
stock_bom_items_list('stock_id', null, false, true);
+echo "</center>";
end_form();
label_cell(_("Component:"));
echo "<td>";
- stock_component_items_list('component', $selected_parent, $_POST['component'], false, true);
+ stock_component_items_list('component', $selected_parent, null, false, true);
echo "</td>";
end_row();
}