freeside inc. web services for address normalizaion and printing, RT#33849
[freeside.git] / FS / FS / part_event / Action / fee.pm
index c2b4673..a18cc33 100644 (file)
@@ -1,5 +1,7 @@
 package FS::part_event::Action::fee;
 
+# DEPRECATED; will most likely be removed in 4.x
+
 use strict;
 use base qw( FS::part_event::Action );
 
@@ -38,7 +40,7 @@ sub _calc_fee {
       # they're definitely NOT linear and we haven't yet had a reason to 
       # make that case work.
       return $total if $self->option('setuptax') eq 'Y'
-                    or FS::Conf->new->exists('enable_taxproducts');
+                    or FS::Conf->new->config('tax_data_vendor');
 
       # estimate tax rate
       # false laziness with xmlhttp-calculate_taxes, cust_main::Billing, etc.
@@ -53,11 +55,9 @@ sub _calc_fee {
       my $part_pkg = FS::part_pkg->new({
           taxclass => $self->option('taxclass')
       });
-      my $error = $cust_main->_handle_taxes(
-        FS::part_pkg->new({ taxclass => ($self->option('taxclass') || '') }),
-        $taxlisthash,
-        $charge,
-        FS::cust_pkg->new({custnum => $cust_main->custnum}),
+      my $error = $cust_main->_handle_taxes( $taxlisthash, $charge,
+        location  => $cust_main->ship_location,
+        part_item => $part_pkg,
       );
       if ( $error ) {
         warn "error estimating taxes for breakage charge: custnum ".$cust_main->custnum."\n";