- if ($form->{type} =~ /(check|receipt)/) {
- $query = qq|DELETE FROM status WHERE spoolfile = ?|;
- } else {
- $query =
- qq|UPDATE status SET spoolfile = NULL, printed = '1' | .
- qq|WHERE spoolfile = ?|;
- }
- my $sth = $dbh->prepare($query) || $form->dberror($query);
-
- foreach my $i (1 .. $form->{rowcount}) {
- if ($form->{"checked_$i"}) {
- $sth->execute($form->{"spoolfile_$i"}) || $form->dberror($query);
- $sth->finish;
+ if ($form->{type} =~ /(check|receipt)/) {
+ $query = qq|DELETE FROM status WHERE spoolfile = ?|;
+ } else {
+ $query =
+ qq|UPDATE status SET spoolfile = NULL, printed = '1' | .
+ qq|WHERE spoolfile = ?|;