Lines 59-65
unless ($confirm) {
Link Here
|
59 |
} |
59 |
} |
60 |
|
60 |
|
61 |
say scalar(@$members) . " patrons to delete"; |
61 |
say scalar(@$members) . " patrons to delete"; |
62 |
|
62 |
my $anonymous_patron = C4::Context->preference("AnonymousPatron"); |
63 |
my $deleted = 0; |
63 |
my $deleted = 0; |
64 |
for my $member (@$members) { |
64 |
for my $member (@$members) { |
65 |
print "Trying to delete patron $member->{borrowernumber}... " |
65 |
print "Trying to delete patron $member->{borrowernumber}... " |
Lines 76-81
for my $member (@$members) {
Link Here
|
76 |
next; |
76 |
next; |
77 |
} |
77 |
} |
78 |
|
78 |
|
|
|
79 |
if ( $anonymous_patron ) { |
80 |
if ( $patron->id eq $anonymous_patron ) { |
81 |
say "Failed to delete patron $borrowernumber: patron is AnonymousPatron"; |
82 |
next; |
83 |
} |
84 |
} |
85 |
|
79 |
if ( $confirm ) { |
86 |
if ( $confirm ) { |
80 |
my $deleted = eval { $patron->move_to_deleted; }; |
87 |
my $deleted = eval { $patron->move_to_deleted; }; |
81 |
if ($@ or not $deleted) { |
88 |
if ($@ or not $deleted) { |
82 |
- |
|
|