summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-12-13 00:31:55 +0000
committerivan <ivan>2002-12-13 00:31:55 +0000
commitca142550bfcc152117fbd4c3d8a7143555d0a387 (patch)
treebecb7439983e30b5fb49043aa48e014298ddb397
parent9ae281d6c0976d4abdb6d9e46a541de690bcea2e (diff)
taxclass fix (?)
-rw-r--r--FS/FS/cust_main.pm23
1 files changed, 11 insertions, 12 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 865d16c83..fdb06200a 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1054,26 +1054,25 @@ sub bill {
|| $self->payby eq 'COMP'
|| $taxable_charged == 0 ) {
- my $cust_main_county =
- qsearchs('cust_main_county',{
+ my $cust_main_county = qsearchs('cust_main_county',{
'state' => $self->state,
'county' => $self->county,
'country' => $self->country,
'taxclass' => $part_pkg->taxclass,
- } )
- or qsearchs('cust_main_county',{
+ } );
+ $cust_main_county ||= qsearchs('cust_main_county',{
'state' => $self->state,
'county' => $self->county,
'country' => $self->country,
'taxclass' => '',
- } )
- or do {
- $dbh->rollback if $oldAutoCommit;
- return
- "fatal: can't find tax rate for state/county/country/taxclass ".
- join('/', ( map $self->$_(), qw(state county country) ),
- $part_pkg->taxclass ). "\n";
- };
+ } );
+ unless ( $cust_main_county ) {
+ $dbh->rollback if $oldAutoCommit;
+ return
+ "fatal: can't find tax rate for state/county/country/taxclass ".
+ join('/', ( map $self->$_(), qw(state county country) ),
+ $part_pkg->taxclass ). "\n";
+ }
if ( $cust_main_county->exempt_amount ) {
my ($mon,$year) = (localtime($sdate) )[4,5];