|
Lines 715-727
sub BatchRevertItems {
Link Here
|
| 715 |
$sth->bind_param(1, $import_record_id); |
715 |
$sth->bind_param(1, $import_record_id); |
| 716 |
$sth->execute(); |
716 |
$sth->execute(); |
| 717 |
while (my $row = $sth->fetchrow_hashref()) { |
717 |
while (my $row = $sth->fetchrow_hashref()) { |
| 718 |
DelItem($dbh, $biblionumber, $row->{'itemnumber'}); |
718 |
my $error = DelItemCheck($dbh, $biblionumber, $row->{'itemnumber'}); |
| 719 |
my $updsth = $dbh->prepare("UPDATE import_items SET status = ? WHERE import_items_id = ?"); |
719 |
if ($error == 1){ |
| 720 |
$updsth->bind_param(1, 'reverted'); |
720 |
my $updsth = $dbh->prepare("UPDATE import_items SET status = ? WHERE import_items_id = ?"); |
| 721 |
$updsth->bind_param(2, $row->{'import_items_id'}); |
721 |
$updsth->bind_param(1, 'reverted'); |
| 722 |
$updsth->execute(); |
722 |
$updsth->bind_param(2, $row->{'import_items_id'}); |
| 723 |
$updsth->finish(); |
723 |
$updsth->execute(); |
| 724 |
$num_items_deleted++; |
724 |
$updsth->finish(); |
|
|
725 |
$num_items_deleted++; |
| 726 |
} |
| 727 |
else { |
| 728 |
next; |
| 729 |
} |
| 725 |
} |
730 |
} |
| 726 |
$sth->finish(); |
731 |
$sth->finish(); |
| 727 |
return $num_items_deleted; |
732 |
return $num_items_deleted; |
| 728 |
- |
|
|