diff options
author | ivan <ivan> | 2009-01-26 04:22:33 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-01-26 04:22:33 +0000 |
commit | 51c5ca4c306af5d35967b130bcd0c8f563b7b23b (patch) | |
tree | 57cabe926dc19cf2f67cb3e611e79a279ce0717d | |
parent | be48a55bb8edc45ee38e4c9098d5d1e49a9f620b (diff) |
i think this was right after all, we do want to look for a county-less state+country match before country only and giving up, RT#4681
-rw-r--r-- | FS/FS/cust_main.pm | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 038577a9b..fa2ccaa2b 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2829,22 +2829,10 @@ sub _handle_taxes { my %taxhash_elim = %taxhash; - # no, unexpected change in behavior. - #my @elim = qw( taxclass county state ); - #while ( !scalar(@taxes) && scalar(@elim) ) { - # $taxhash_elim{ shift(@elim) } = ''; - # @taxes = qsearch( 'cust_main_county', \%taxhash_elim ); - #} - - #just try taxclass first, then state+county, not county in the middle - unless ( @taxes ) { - $taxhash_elim{'taxclass'} = ''; - @taxes = qsearch( 'cust_main_county', \%taxhash_elim ); - } - #one more try at a whole-country tax rate - unless ( @taxes ) { - $taxhash_elim{$_} = '' foreach qw( state county ); - @taxes = qsearch( 'cust_main_county', \%taxhash_elim ); + my @elim = qw( taxclass county state ); + while ( !scalar(@taxes) && scalar(@elim) ) { + $taxhash_elim{ shift(@elim) } = ''; + @taxes = qsearch( 'cust_main_county', \%taxhash_elim ); } if ( $conf->exists('tax-pkg_address') && $cust_pkg->locationnum ) { |