- my $part_pkg_taxrate = qsearchs('part_pkg_taxrate', $hash);
- unless ( $part_pkg_taxrate ) {
+ foreach my $intfield (qw( taxproductnum taxclassnum effdate )) {
+ if ( $hash->{$intfield} eq '' ) {
+ return "$intfield is empty in search! -- ".
+ join(" ", map { "$_ => *". $hash->{$_}. '*' } keys(%$hash) );
+ }
+ }
+
+ my @part_pkg_taxrate = qsearch('part_pkg_taxrate', $hash);
+ unless ( scalar(@part_pkg_taxrate) || $param->{'delete_only'} ) {