- #$taxable_units = 1;
- #number of distinct locations
- my %seen = ();
- foreach (@cust_bill_pkg) {
- $taxable_units++
- unless $seen{$_->cust_pkg->locationnum}++;
+
+ my $conf = new FS::Conf;
+ if ( $conf->exists('tax-pkg_address') ) {
+ #number of distinct locations
+ my %seen = ();
+ foreach (@cust_bill_pkg) {
+ $taxable_units++
+ unless $seen{$_->cust_pkg->locationnum}++;
+ }
+ } else {
+ $taxable_units = 1;