diff options
author | ivan <ivan> | 2010-10-31 18:45:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-10-31 18:45:42 +0000 |
commit | b7858740e458e761b173f0e38f547c0e2f75b240 (patch) | |
tree | bfce01b59999ba54bbbc65eb207188d31f98a3ed | |
parent | 54d7c40d228ac2056826e0c69ac5702cd26be499 (diff) |
don't lookup a geocode we don't need, RT#10093
-rw-r--r-- | FS/FS/cust_main/Billing.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm index 496ef71c3..cd1d2bd46 100644 --- a/FS/FS/cust_main/Billing.pm +++ b/FS/FS/cust_main/Billing.pm @@ -1225,9 +1225,13 @@ sub _gather_taxes { local($DEBUG) = $FS::cust_main::DEBUG if $FS::cust_main::DEBUG > $DEBUG; - my $geocode = $self->geocode('cch'); - $geocode = $cust_pkg->cust_location->geocode('cch') - if ( $conf->exists('tax-pkg_address') && $cust_pkg->locationnum ); + my $geocode; + if ( $cust_pkg->locationnum && $conf->exists('tax-pkg_address') ) { + $geocode = $cust_pkg->cust_location->geocode('cch'); + } else { + $geocode = $self->geocode('cch'); + } + my @taxes = (); my @taxclassnums = map { $_->taxclassnum } |