From: ivan Date: Mon, 22 Dec 2003 21:22:19 +0000 (+0000) Subject: default to the whole-country tax rate if states aren't defined X-Git-Tag: NET_WHOIS_RAW_0_31~219 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=c2671089005c4f4f1fb886b9936aa8d5eea5eb59 default to the whole-country tax rate if states aren't defined --- diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 0046f0287..8695ae09c 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1239,6 +1239,16 @@ sub bill { } ); } + #one more try at a whole-country tax rate + unless ( @taxes ) { + @taxes = qsearch( 'cust_main_county', { + 'state' => '', + 'county' => '', + 'country' => $self->country, + 'taxclass' => '', + } ); + } + # maybe eliminate this entirely, along with all the 0% records unless ( @taxes ) { $dbh->rollback if $oldAutoCommit;