- $hash->{$item} = $tax_class->taxclassnum
- if $tax_class;
-
- return "Can't find tax class for txmatrix deletion: ".
- join(" ", map { "$_ => ". $hash->{$_} } @fields)
- if ( $hash->{'actionflag'} && $hash->{'actionflag'} eq 'D' &&
- !$tax_class && $class ne ':'
- );
+ if ( $tax_class ) {
+ $hash->{$item} = $tax_class->taxclassnum;
+ } elsif ($class ne ':' and ($hash->{actionflag} || '') eq 'D') {
+ # return "Can't find tax class for txmatrix deletion: ".
+ warn "WARNING: Can't find tax class $class for txmatrix deletion (ignored)\n";
+ return ''; # don't delete the record, then
+ }