diff options
author | Mark Wells <mark@freeside.biz> | 2015-05-30 15:12:07 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-05-30 15:12:07 -0700 |
commit | 817c1ce0e1cbcfd1f684222c66f46dd13b2d6dd7 (patch) | |
tree | 25fd80fae19bbe1b4ec2c892a35a631cf232d590 /httemplate/edit | |
parent | 3846acae1c2a7ecb275e400cf3802ada6bc89ed2 (diff) |
SureTax, #31639, #33015, #34598
Diffstat (limited to 'httemplate/edit')
-rw-r--r-- | httemplate/edit/part_fee.html | 2 | ||||
-rwxr-xr-x | httemplate/edit/part_pkg.cgi | 44 | ||||
-rwxr-xr-x | httemplate/edit/process/part_pkg.cgi | 2 | ||||
-rw-r--r-- | httemplate/edit/process/quick-charge.cgi | 4 |
4 files changed, 29 insertions, 23 deletions
diff --git a/httemplate/edit/part_fee.html b/httemplate/edit/part_fee.html index 339941015..5f6dc3818 100644 --- a/httemplate/edit/part_fee.html +++ b/httemplate/edit/part_fee.html @@ -35,7 +35,7 @@ die "access denied" my $conf = FS::Conf->new; my @tax_fields; -if ( $conf->exists('enable_taxproducts') ) { +if ( $conf->config('tax_data_vendor') ) { @tax_fields = ( { field => 'taxproductnum', type => 'select-taxproduct' } ); diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index fbc19c3f5..bfa5d50ea 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -179,22 +179,28 @@ type => 'hidden', value => join(',', @taxproductnums), }, - { field => 'taxproduct_select', - type => 'selectlayers', - options => [ '(default)', @taxproductnums ], - curr_value => '(default)', - labels => { ( '(default)' => '(default)' ), - map {($_=>$usage_class{$_})} - @taxproductnums - }, - layer_fields => \%taxproduct_fields, - layer_values_callback => $taxproduct_values, - layers_only => !$taxproducts, - cell_style => ( !$taxproducts - ? 'display:none' - : '' - ), + #{ field => 'taxproduct_select', + # type => 'selectlayers', + # options => [ '(default)', @taxproductnums ], + # curr_value => '(default)', + # labels => { ( '(default)' => '(default)' ), + # map {($_=>$usage_class{$_})} + # @taxproductnums + # }, + # layer_fields => \%taxproduct_fields, + # layer_values_callback => $taxproduct_values, + # layers_only => !$taxproducts, + # cell_style => ( !$taxproducts + # ? 'display:none' + # : '' + # ), + #}, + { field => 'taxproductnum', + type => 'part_pkg-taxproducts', + include_opt_callback => + sub { pkgpart => $_[0]->pkgpart }, }, + { type => 'tablebreak-tr-title', value => 'Promotions', #better name? @@ -414,7 +420,7 @@ my $agent_clone_extra_sql = ' ) '; my $conf = new FS::Conf; -my $taxproducts = $conf->exists('enable_taxproducts'); +my $taxproducts = $conf->config('tax_data_vendor') ne ''; my $fcc_opts = $conf->exists('part_pkg-show_fcc_options'); @@ -1120,9 +1126,9 @@ my $html_bottom = sub { '<SCRIPT TYPE="text/javascript">'. include('/elements/selectlayers.html', %selectlayers, 'js_only'=>1 ); - $return .= - "taxproduct_selectchanged(document.getElementById('taxproduct_select'));\n" - if $taxproducts; +# $return .= +# "taxproduct_selectchanged(document.getElementById('taxproduct_select'));\n" +# if $taxproducts; $return .= '</SCRIPT>'; diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index eda3f33d4..f3ee06157 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -117,7 +117,7 @@ my $args_callback = sub { $error ||= "Illegal $param: $value" unless ( $value =~ /^\d*$/ ); if (length($class)) { - $options{"usage_taxproductnum_$_"} = $value; + $options{"usage_taxproductnum_$class"} = $value; } else { $new->set('taxproductnum', $value); } diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index c1e7fc159..23eead451 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -74,7 +74,7 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge if ( $param->{'taxclass'} eq '(select)' ) { $error .= "Must select a tax class. " - unless ($conf->exists('enable_taxproducts') && + unless ($conf->config('tax_data_vendor') && ( $override || $param->{taxproductnum} ) ); $cgi->param('taxclass', ''); @@ -122,7 +122,7 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge if ( $param->{'taxclass'} eq '(select)' ) { $error .= "Must select a tax class. " - unless ($conf->exists('enable_taxproducts') && + unless ($conf->config('tax_data_vendor')) ( $override || $param->{taxproductnum} ) ); $cgi->param('taxclass', ''); |