}
}
+ if ($form->{"partsgroup_id"}) {
+ $form->{"l_partsgroup"} = '1'; # show the column
+ push @where_tokens, "pg.id = ?";
+ push @bind_vars, $form->{"partsgroup_id"};
+ }
+
foreach (@like_filters) {
next unless $form->{$_};
$form->{"l_$_"} = '1'; # show the column
$form->header;
+ $form->get_lists('partsgroup' => 'ALL_PARTSGROUPS');
print $form->parse_html_template('ic/search', { %is_xyz,
- dateformat => $myconfig{dateformat}, });
+ dateformat => $myconfig{dateformat},
+ limit => $myconfig{vclimit}, });
$lxdebug->leave_sub();
} #end search()
no_sn_joins => [ qw(bought sold) ],
);
+ # get name of partsgroup if id is given
+ my $pg_name;
+ if ($form->{partsgroup_id}) {
+ my $pg = SL::DB::PartsGroup->new(id => $form->{partsgroup_id})->load;
+ $pg_name = $pg->{'partsgroup'};
+ }
+
# these strings get displayed at the top of the results to indicate the user which switches were used
my %optiontexts = (
active => $locale->text('Active'),
transdateto => $locale->text('To (time)') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1),
partnumber => $locale->text('Part Number') . ": '$form->{partnumber}'",
partsgroup => $locale->text('Group') . ": '$form->{partsgroup}'",
+ partsgroup_id => $locale->text('Group') . ": '$pg_name'",
serialnumber => $locale->text('Serial Number') . ": '$form->{serialnumber}'",
description => $locale->text('Part Description') . ": '$form->{description}'",
make => $locale->text('Make') . ": '$form->{make}'",
);
my @itemstatus_keys = qw(active obsolete orphaned onhand short);
- my @callback_keys = qw(onorder ordered rfq quoted bought sold partnumber partsgroup serialnumber description make model
+ my @callback_keys = qw(onorder ordered rfq quoted bought sold partnumber partsgroup partsgroup_id serialnumber description make model
drawing microfiche l_soldtotal l_deliverydate transdatefrom transdateto ean);
# calculate dependencies
<tr>
<th align="right" nowrap>[% 'Group' | $T8 %]</th>
- <td><input name="partsgroup" size="20"></td>
+ <td>
+ [%- INCLUDE generic/multibox.html
+ name = 'partsgroup',
+ select_name = 'partsgroup_id',
+ DATA = ALL_PARTSGROUPS,
+ show_empty = 1,
+ id_key = 'id',
+ label_key = 'partsgroup',
+ style = 'width:250px',
+ limit = limit,
+ allow_textbox = 1
+ -%]
+ </td>
<th align="right" nowrap>[% 'Serial Number' | $T8 %]</th> <td><input name="serialnumber" size="20"></td>
</tr>