[freeside-commits] freeside/FS/FS cust_main.pm,1.404,1.405
Ivan,,,
ivan at wavetail.420.am
Sun Jan 25 20:22:35 PST 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv27767
Modified Files:
cust_main.pm
Log Message:
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
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.404
retrieving revision 1.405
diff -u -d -r1.404 -r1.405
--- cust_main.pm 26 Jan 2009 01:36:36 -0000 1.404
+++ cust_main.pm 26 Jan 2009 04:22:33 -0000 1.405
@@ -2829,22 +2829,10 @@
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 ) {
More information about the freeside-commits
mailing list