+
+ if ( $opt{k} && $opt{i} ) {
+ my @other_pkgs = grep { $_->pkgpart != $opt{k} }
+ grep $_, map $_->cust_pkg, $record->cust_bill_pkg;
+ next if ! @other_pkgs;
+ }
+
+ if ( $opt{v} ) {
+ $pkey ||= $record->primary_key;
+ my $num = $record->get($pkey);
+ my $date = time2str('%x', $record->_date);
+ my $name = $record->cust_main->name;
+ warn "Voiding $table #$num ($date) for $name\n";
+ }
+