View | Details | Raw Unified | Return to bug 7329
Collapse All | Expand All

(-)a/C4/ImportBatch.pm (-8 / +12 lines)
Lines 644-656 sub BatchRevertItems { Link Here
644
    $sth->bind_param(1, $import_record_id);
644
    $sth->bind_param(1, $import_record_id);
645
    $sth->execute();
645
    $sth->execute();
646
    while (my $row = $sth->fetchrow_hashref()) {
646
    while (my $row = $sth->fetchrow_hashref()) {
647
        DelItem($dbh, $biblionumber, $row->{'itemnumber'});
647
        my $error = DelItemCheck($dbh, $biblionumber, $row->{'itemnumber'});
648
        my $updsth = $dbh->prepare("UPDATE import_items SET status = ? WHERE import_items_id = ?");
648
        if ($error == 1){
649
        $updsth->bind_param(1, 'reverted');
649
            my $updsth = $dbh->prepare("UPDATE import_items SET status = ? WHERE import_items_id = ?");
650
        $updsth->bind_param(2, $row->{'import_items_id'});
650
            $updsth->bind_param(1, 'reverted');
651
        $updsth->execute();
651
            $updsth->bind_param(2, $row->{'import_items_id'});
652
        $updsth->finish();
652
            $updsth->execute();
653
        $num_items_deleted++;
653
            $updsth->finish();
654
            $num_items_deleted++;
655
        }
656
        else {
657
            next;
658
        }
654
    }
659
    }
655
    $sth->finish();
660
    $sth->finish();
656
    return $num_items_deleted;
661
    return $num_items_deleted;
657
- 

Return to bug 7329