Lines 36-41
use Koha::Old::Holds;
Link Here
|
36 |
use Koha::Calendar; |
36 |
use Koha::Calendar; |
37 |
use Koha::Plugins; |
37 |
use Koha::Plugins; |
38 |
|
38 |
|
|
|
39 |
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue; |
40 |
|
39 |
use Koha::Exceptions::Hold; |
41 |
use Koha::Exceptions::Hold; |
40 |
|
42 |
|
41 |
use base qw(Koha::Object); |
43 |
use base qw(Koha::Object); |
Lines 124-129
sub suspend_hold {
Link Here
|
124 |
logaction( 'HOLDS', 'SUSPEND', $self->reserve_id, $self ) |
126 |
logaction( 'HOLDS', 'SUSPEND', $self->reserve_id, $self ) |
125 |
if C4::Context->preference('HoldsLog'); |
127 |
if C4::Context->preference('HoldsLog'); |
126 |
|
128 |
|
|
|
129 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
130 |
{ |
131 |
biblio_ids => [ $self->biblionumber ] |
132 |
} |
133 |
); |
134 |
|
127 |
return $self; |
135 |
return $self; |
128 |
} |
136 |
} |
129 |
|
137 |
|
Lines 152-157
sub resume {
Link Here
|
152 |
logaction( 'HOLDS', 'RESUME', $self->reserve_id, $self ) |
160 |
logaction( 'HOLDS', 'RESUME', $self->reserve_id, $self ) |
153 |
if C4::Context->preference('HoldsLog'); |
161 |
if C4::Context->preference('HoldsLog'); |
154 |
|
162 |
|
|
|
163 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
164 |
{ |
165 |
biblio_ids => [ $self->biblionumber ] |
166 |
} |
167 |
); |
168 |
|
155 |
return $self; |
169 |
return $self; |
156 |
} |
170 |
} |
157 |
|
171 |
|
Lines 516-523
sub is_suspended {
Link Here
|
516 |
|
530 |
|
517 |
my $cancel_hold = $hold->cancel( |
531 |
my $cancel_hold = $hold->cancel( |
518 |
{ |
532 |
{ |
519 |
[ charge_cancel_fee => 1||0, ] |
533 |
[ charge_cancel_fee => 1||0, ] |
520 |
[ cancellation_reason => $cancellation_reason, ] |
534 |
[ cancellation_reason => $cancellation_reason, ] |
|
|
535 |
[ skip_holds_queue => 1||0 ] |
521 |
} |
536 |
} |
522 |
); |
537 |
); |
523 |
|
538 |
|
Lines 607-612
sub cancel {
Link Here
|
607 |
|
622 |
|
608 |
C4::Log::logaction( 'HOLDS', 'CANCEL', $self->reserve_id, $self ) |
623 |
C4::Log::logaction( 'HOLDS', 'CANCEL', $self->reserve_id, $self ) |
609 |
if C4::Context->preference('HoldsLog'); |
624 |
if C4::Context->preference('HoldsLog'); |
|
|
625 |
|
626 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
627 |
{ |
628 |
biblio_ids => [ $old_me->biblionumber ] |
629 |
} |
630 |
) unless $params->{skip_holds_queue}; |
610 |
} |
631 |
} |
611 |
); |
632 |
); |
612 |
return $self; |
633 |
return $self; |
Lines 671-676
sub fill {
Link Here
|
671 |
|
692 |
|
672 |
C4::Log::logaction( 'HOLDS', 'FILL', $self->id, $self ) |
693 |
C4::Log::logaction( 'HOLDS', 'FILL', $self->id, $self ) |
673 |
if C4::Context->preference('HoldsLog'); |
694 |
if C4::Context->preference('HoldsLog'); |
|
|
695 |
|
696 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
697 |
{ |
698 |
biblio_ids => [ $old_me->biblionumber ] |
699 |
} |
700 |
); |
674 |
} |
701 |
} |
675 |
); |
702 |
); |
676 |
return $self; |
703 |
return $self; |