+
+if (
+ (ref $value && $value)
+ or (ref $opt{hashref} && exists $opt{hashref}->{disabled})
+ or $opt{also_show_option}
+) {
+
+ delete $opt{hashref}->{disabled};
+
+ # also_show_option: (hack for change_pkg form):
+ # Include an absent select option, without selecting it
+ # as the curr_value
+ my @also_show = ref($value) ? keys %$value : ($value);
+ push @also_show, $opt{also_show_option} if $opt{also_show_option};
+
+ foreach my $v ( @also_show ) {
+ next if grep { $v == $_->$key() } @records;
+
+ $opt{hashref}->{$key} = $v;
+ my $record = qsearchs( {
+ 'table' => $opt{table},
+ 'addl_from' => $opt{'addl_from'},
+ 'hashref' => $hashref,
+ 'extra_sql' => $extra_sql,
+ });
+ push @records, $record if $record;
+
+ }
+}
+