From: ivan Date: Mon, 22 Dec 2003 21:22:31 +0000 (+0000) Subject: default to the whole-country tax rate if states aren't defined X-Git-Tag: freeside_1_4_2beta1~338 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=2ee3a78a58063d46ec871e19cdc6edc15fedb9e9;p=freeside.git 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 e49bf70ca..57fe3b851 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1220,6 +1220,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;