Lines 44-49
use C4::Reserves qw( ModReserve ModReserveAffect CheckReserves );
Link Here
|
44 |
use C4::RotatingCollections; |
44 |
use C4::RotatingCollections; |
45 |
use C4::Log qw( logaction ); |
45 |
use C4::Log qw( logaction ); |
46 |
use Koha::AuthorisedValues; |
46 |
use Koha::AuthorisedValues; |
|
|
47 |
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue; |
47 |
use Koha::BiblioFrameworks; |
48 |
use Koha::BiblioFrameworks; |
48 |
use Koha::Calendar; |
49 |
use Koha::Calendar; |
49 |
use Koha::Checkouts; |
50 |
use Koha::Checkouts; |
Lines 387-394
if ( $barcode && ( $op eq 'cud-checkin' || $op eq 'cud-affect_reserve' ) ) {
Link Here
|
387 |
} |
388 |
} |
388 |
|
389 |
|
389 |
# do the return |
390 |
# do the return |
390 |
( $returned, $messages, $issue, $borrower ) = AddReturn( $barcode, $userenv_branch, $exemptfine, $return_date ) |
391 |
unless ( $needs_confirm || $bundle_confirm ) { |
391 |
unless ( $needs_confirm || $bundle_confirm ); |
392 |
( $returned, $messages, $issue, $borrower ) = AddReturn( $barcode, $userenv_branch, $exemptfine, $return_date ); |
|
|
393 |
|
394 |
# Rebuild the queue only after handling confirmations |
395 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( { biblio_ids => [ $item->biblionumber ] } ) |
396 |
if $returned && C4::Context->preference('RealTimeHoldsQueue'); |
397 |
} |
392 |
|
398 |
|
393 |
if ($returned) { |
399 |
if ($returned) { |
394 |
my $date_due_dt = dt_from_string( $issue->date_due, 'sql' ); |
400 |
my $date_due_dt = dt_from_string( $issue->date_due, 'sql' ); |