X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Ftax_rate.pm;h=b18f8ee19f1350ae4a89aff6a30be5a87e7ac4dd;hb=f0cf935a32a2e0186dfff6c30513693965a68cf9;hp=ab1a69eab9732c68aae9ef1d3f8eeeb1c8be88e9;hpb=ca64920f7bd3c6599c164b5fcb126a6a1c0f7c42;p=freeside.git diff --git a/FS/FS/tax_rate.pm b/FS/FS/tax_rate.pm index ab1a69eab..b18f8ee19 100644 --- a/FS/FS/tax_rate.pm +++ b/FS/FS/tax_rate.pm @@ -575,9 +575,11 @@ sub taxline { } elsif ( $self->unittype == 2 ) { + my $locationnum = $cust_bill_pkg->tax_locationnum + || $cust_main->ship_locationnum; # per account - $units = 1 unless $seen{$cust_bill_pkg->tax_locationnum}; - $seen{$cust_bill_pkg->tax_locationnum} = 1; + $units = 1 unless $seen{$locationnum}; + $seen{$locationnum} = 1; } else { # Unittype 19 is used for prepaid wireless E911 charges in many states. @@ -594,6 +596,7 @@ sub taxline { 'locationtaxid' => $self->location, 'taxable_cust_bill_pkg' => $cust_bill_pkg, 'taxratelocationnum' => $taxratelocationnum, + 'taxclass' => $class, }); push @tax_locations, $tax_location; @@ -645,6 +648,9 @@ sub taxline { 'edate' => '', 'itemdesc' => $name, 'cust_bill_pkg_tax_rate_location' => [ $_ ], + # Make the charge class easily accessible; we need it for tax-on-tax + # applicability. RT#36830. + '_class' => $_->taxclass, }); $_->set('tax_cust_bill_pkg' => $tax_item); push @tax_items, $tax_item; @@ -2281,7 +2287,7 @@ EOF my $dropstring = '%%%FREESIDE_CACHE%%%/cache.'. $FS::UID::datasrc. '/report.'; $reportname =~ s/^$dropstring//; - my $reporturl = "%%%ROOTURL%%%/misc/queued_report?report=$reportname"; + my $reporturl = "%%%ROOTURL%%%/misc/queued_report.html?report=$reportname"; die "view\n"; }