|
Lines 112-123
warn "Running in test mode, no actions will be taken" unless ($confirm);
Link Here
|
| 112 |
|
112 |
|
| 113 |
$verbose and warn "Looking for unfilled holds placed $days or more days ago\n"; |
113 |
$verbose and warn "Looking for unfilled holds placed $days or more days ago\n"; |
| 114 |
|
114 |
|
| 115 |
unless ( scalar @branchcodes > 0 ) { |
115 |
@branchcodes = Koha::Libraries->search->get_column('branchcode') if !@branchcodes; |
| 116 |
my $branches = Koha::Libraries->search->get_column('branchcode'); |
|
|
| 117 |
while ( my $branch = $branches->next ) { |
| 118 |
push @branchcodes, $branch->branchcode; |
| 119 |
} |
| 120 |
} |
| 121 |
$verbose and warn "Running for branch(es): " . join( "|", @branchcodes ) . "\n"; |
116 |
$verbose and warn "Running for branch(es): " . join( "|", @branchcodes ) . "\n"; |
| 122 |
|
117 |
|
| 123 |
foreach my $branch (@branchcodes) { |
118 |
foreach my $branch (@branchcodes) { |
|
Lines 144-150
foreach my $branch (@branchcodes) {
Link Here
|
| 144 |
. $hold->borrowernumber |
139 |
. $hold->borrowernumber |
| 145 |
. " on biblio: " |
140 |
. " on biblio: " |
| 146 |
. $hold->biblionumber . "\n"; |
141 |
. $hold->biblionumber . "\n"; |
| 147 |
CancelReserve( { reserve_id => $hold->reserve_id } ) if $confirm; |
142 |
$hold->cancel if $confirm; |
| 148 |
} |
143 |
} |
| 149 |
|
144 |
|
| 150 |
} |
145 |
} |
| 151 |
- |
|
|