1 <% encode_json({ part_pkg_taxproduct => [ map { $_->taxproduct => $_->description } @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');
11 my $hashref = { 'data_vendor' => $args{'data_vendor'} };
13 my @part_pkg_taxproduct;
14 if ( $args{category} =~ /^(\w)$/ ) {
16 @part_pkg_taxproduct = qsearch({
17 table => 'part_pkg_taxproduct',
19 extra_sql => " AND taxproduct LIKE '$category%' AND length(taxproduct) = 4 ",
22 } elsif ( $args{product_code} =~ /^([A-Z]\d+)$/ ) {
23 my $product_code = $1;
24 @part_pkg_taxproduct = qsearch({
25 table => 'part_pkg_taxproduct',
27 extra_sql => " AND taxproduct LIKE '$product_code%' AND length(taxproduct) > 4 ",
31 die 'neither category nor product_code specified';