1 <% encode_json({ part_pkg_taxproduct => \@part_pkg_taxproduct }) %>\
4 #compliance solutions specific for now, since they asked for a multi-level
7 #my $sub = $cgi->param('sub');
9 my( %args ) = $cgi->multi_param('arg');
12 table => 'part_pkg_taxproduct',
13 hashref => { 'data_vendor' => $args{'data_vendor'} },
16 my @part_pkg_taxproduct;
17 if ( $args{category} =~ /^(\w)$/ ) {
21 @part_pkg_taxproduct =
22 map { $_->taxproduct => $_->description }
24 extra_sql => " AND taxproduct LIKE '$category%' ".
25 " AND length(taxproduct) = 4 ",
28 } elsif ( $args{product_code} =~ /^([A-Z]\d+)$/ ) {
30 my $product_code = $1;
32 @part_pkg_taxproduct =
33 map { $_->taxproductnum. ' '. $_->taxproduct => $_->description }
35 extra_sql => " AND taxproduct LIKE '$product_code%'".
36 " AND length(taxproduct) > 4 ",
40 die 'neither category nor product_code specified';