$bom = $bom_list[$stock_id];
if ($bom == NULL) {
$sql = "SELECT parent, component, quantity FROM ".TB_PREF."bom WHERE parent = '$stock_id'";
$bom = $bom_list[$stock_id];
if ($bom == NULL) {
$sql = "SELECT parent, component, quantity FROM ".TB_PREF."bom WHERE parent = '$stock_id'";