From: ivan Date: Fri, 26 Sep 2003 09:31:11 +0000 (+0000) Subject: scalar/array scope fix... new, multiple (i.e. canadian GST/PST) taxes work now! X-Git-Tag: NET_WHOIS_RAW_0_31~374 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=b0fb4547e39f3ad26bedb95d8cc8b5a10f66a4eb;hp=6621bcd8966b784ff930c51548432a15e8094e94 scalar/array scope fix... new, multiple (i.e. canadian GST/PST) taxes work now! --- diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 385899387..90cf18e8f 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1165,18 +1165,20 @@ sub bill { unless ( $self->tax =~ /Y/i || $self->payby eq 'COMP' ) { - my @taxes = qsearch( 'cust_main_county', { - 'state' => $self->state, - 'county' => $self->county, - 'country' => $self->country, - 'taxclass' => $part_pkg->taxclass, - } ) - || qsearch( 'cust_main_county', { + my @taxes = qsearch( 'cust_main_county', { + 'state' => $self->state, + 'county' => $self->county, + 'country' => $self->country, + 'taxclass' => $part_pkg->taxclass, + } ); + unless ( @taxes ) { + @taxes = qsearch( 'cust_main_county', { 'state' => $self->state, 'county' => $self->county, 'country' => $self->country, 'taxclass' => '', } ); + } # maybe eliminate this entirely, along with all the 0% records unless ( @taxes ) {