|
Lines 56-63
my $dbh = C4::Context->dbh;
Link Here
|
| 56 |
$dbh->{RaiseError} = 1; |
56 |
$dbh->{RaiseError} = 1; |
| 57 |
$dbh->{PrintError} = 0; |
57 |
$dbh->{PrintError} = 0; |
| 58 |
|
58 |
|
| 59 |
@$members = ( { borrowernumber => 19 } ); |
|
|
| 60 |
|
| 61 |
$dbh->{AutoCommit} = 0; # use transactions to avoid partial deletes |
59 |
$dbh->{AutoCommit} = 0; # use transactions to avoid partial deletes |
| 62 |
for my $member (@$members) { |
60 |
for my $member (@$members) { |
| 63 |
print "Trying to delete patron $member->{borrowernumber}... " |
61 |
print "Trying to delete patron $member->{borrowernumber}... " |
|
Lines 96-102
delete_patrons - This script deletes patrons
Link Here
|
| 96 |
|
94 |
|
| 97 |
=head1 SYNOPSIS |
95 |
=head1 SYNOPSIS |
| 98 |
|
96 |
|
| 99 |
delete_patrons.pl [-h -v -c] --not_borrowed_since=2013-07-21 --expired_before=2013-07-21 --category_code=CAT --branchcode=CPL |
97 |
delete_patrons.pl [-h -v -c] --not_borrowed_since=2013-07-21 --expired_before=2013-07-21 --category_code=CAT --library=CPL |
| 100 |
|
98 |
|
| 101 |
dates can be generated with `date -d '-3 month' "+%Y-%m-%d"` |
99 |
dates can be generated with `date -d '-3 month' "+%Y-%m-%d"` |
| 102 |
|
100 |
|
|
Lines 122-128
Delete patrons with an account expired before this date.
Link Here
|
| 122 |
|
120 |
|
| 123 |
Delete patrons who have this category code. |
121 |
Delete patrons who have this category code. |
| 124 |
|
122 |
|
| 125 |
=item B<--branchcode> |
123 |
=item B<--library> |
| 126 |
|
124 |
|
| 127 |
Delete patrons in this library. |
125 |
Delete patrons in this library. |
| 128 |
|
126 |
|
| 129 |
- |
|
|