X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Ftax_rate.pm;h=30d7f58d04d561429654135197911536bcd50012;hb=bef5524812ba07f939d1445a8c64b4474787e8f6;hp=93550b178c5d20b53f8d274a8ba7eb2e44c5aebb;hpb=250e277720fbe288875736c7f5f957668f4c1880;p=freeside.git diff --git a/FS/FS/tax_rate.pm b/FS/FS/tax_rate.pm index 93550b178..30d7f58d0 100644 --- a/FS/FS/tax_rate.pm +++ b/FS/FS/tax_rate.pm @@ -407,13 +407,14 @@ sub taxline { }; } - if ($self->maxtype != 0 && $self->maxtype != 9) { + my $maxtype = $self->maxtype || 0; + if ($maxtype != 0 && $maxtype != 9) { return $self->_fatal_or_null( 'tax with "'. $self->maxtype_name. '" threshold' ); } - if ($self->maxtype == 9) { + if ($maxtype == 9) { return $self->_fatal_or_null( 'tax with "'. $self->maxtype_name. '" threshold' ); # "texas" tax @@ -439,7 +440,7 @@ sub taxline { my $taxable_units = 0; unless ($self->recurtax =~ /^Y$/i) { - if ($self->unittype == 0) { + if (( $self->unittype || 0 ) == 0) { my %seen = (); foreach (@cust_bill_pkg) { $taxable_units += $_->units @@ -480,16 +481,16 @@ sub _fatal_or_null { my $conf = new FS::Conf; - $error = "fatal: can't yet handle ". $error; + $error = "can't yet handle $error"; my $name = $self->taxname; $name = 'Other surcharges' if ($self->passtype == 2); if ($conf->exists('ignore_incalculable_taxes')) { - warn $error; + warn "WARNING: $error; billing anyway per ignore_incalculable_taxes conf\n"; return { name => $name, amount => 0 }; } else { - return $error; + return "fatal: $error"; } }