Lines 148-153
print "found " . $auto_renews->count . " auto renewals\n" if $verbose;
Link Here
|
148 |
|
148 |
|
149 |
my $renew_digest = {}; |
149 |
my $renew_digest = {}; |
150 |
my %report; |
150 |
my %report; |
|
|
151 |
my @item_renewal_ids; |
151 |
while ( my $auto_renew = $auto_renews->next ) { |
152 |
while ( my $auto_renew = $auto_renews->next ) { |
152 |
print "examining item '" . $auto_renew->itemnumber . "' to auto renew\n" if $verbose; |
153 |
print "examining item '" . $auto_renew->itemnumber . "' to auto renew\n" if $verbose; |
153 |
|
154 |
|
Lines 180-186
while ( my $auto_renew = $auto_renews->next ) {
Link Here
|
180 |
$auto_renew->issue_id, $auto_renew->borrowernumber, $auto_renew->itemnumber, $confirm ? 'will' : 'would'; |
181 |
$auto_renew->issue_id, $auto_renew->borrowernumber, $auto_renew->itemnumber, $confirm ? 'will' : 'would'; |
181 |
} |
182 |
} |
182 |
if ($confirm){ |
183 |
if ($confirm){ |
183 |
my $date_due = AddRenewal( $auto_renew->borrowernumber, $auto_renew->itemnumber, $auto_renew->branchcode, undef, undef, undef, 0 ); |
184 |
my $date_due = AddRenewal( $auto_renew->borrowernumber, $auto_renew->itemnumber, $auto_renew->branchcode, undef, undef, undef, 0, 1 ); |
|
|
185 |
push @item_renewal_ids, $auto_renew->itemnumber; |
184 |
$auto_renew->auto_renew_error(undef)->store; |
186 |
$auto_renew->auto_renew_error(undef)->store; |
185 |
} |
187 |
} |
186 |
push @{ $report{ $auto_renew->borrowernumber } }, $auto_renew |
188 |
push @{ $report{ $auto_renew->borrowernumber } }, $auto_renew |
Lines 226-231
while ( my $auto_renew = $auto_renews->next ) {
Link Here
|
226 |
|
228 |
|
227 |
} |
229 |
} |
228 |
|
230 |
|
|
|
231 |
if( @item_renewal_ids ){ |
232 |
my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX }); |
233 |
$indexer->index_records( \@item_renewal_ids, "specialUpdate", "biblioserver" ); |
234 |
} |
235 |
|
229 |
if ( $send_notices && $confirm ) { |
236 |
if ( $send_notices && $confirm ) { |
230 |
for my $borrowernumber ( keys %report ) { |
237 |
for my $borrowernumber ( keys %report ) { |
231 |
my $patron = Koha::Patrons->find($borrowernumber); |
238 |
my $patron = Koha::Patrons->find($borrowernumber); |
232 |
- |
|
|