};
}
- 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
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
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";
}
}