<& /elements/header-popup.html, { title => 'Select tax product' } &>
<& /elements/tr-select-table.html, 'label' => 'Tax product', 'field' => 'taxproductnum', 'table' => 'part_pkg_taxproduct', 'hashref' => { data_vendor => 'avalara' }, 'name_col' => 'taxproduct', # for sorting 'label_callback' => $label_callback, 'curr_value' => $taxproductnum, 'empty_label' => 'none', 'onchange' => 'select_onchange', &>
Add a new tax product
Avalara tax code
Description
<%once> my $conf = new FS::Conf; <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Edit package definitions'); # id: where to put the taxproductnum (in the parent document) after the user # selects it $cgi->param('id') =~ /^([ \w]+)$/ or die "id parameter required"; my $id = $1; # current value of taxproductnum my $taxproductnum = ''; if ($cgi->param('taxproductnum') =~ /^(\d+)$/) { $taxproductnum = $1; } my $label_callback = sub { my $part_pkg_taxproduct = shift; join(' ', $part_pkg_taxproduct->taxproduct, $part_pkg_taxproduct->description); };