5 sub retrieve_partunits {
6 $main::lxdebug->enter_sub();
11 Common::check_params(\%params, qw(part_ids));
13 my $myconfig = \%main::myconfig;
14 my $form = $main::form;
16 my $dbh = $params{dbh} || $form->get_standard_dbh();
18 my $query = qq|SELECT id, unit FROM parts WHERE id IN (| . join(', ', map { '?' } @{ $params{part_ids} }) . qq|)|;
19 my %units = selectall_as_map($form, $dbh, $query, 'id', 'unit', @{ $params{part_ids} });
21 $main::lxdebug->leave_sub();