Lines 34-39
use Koha::Items;
Link Here
|
34 |
use Koha::Libraries; |
34 |
use Koha::Libraries; |
35 |
use Koha::Old::Holds; |
35 |
use Koha::Old::Holds; |
36 |
use Koha::Calendar; |
36 |
use Koha::Calendar; |
|
|
37 |
use Koha::Plugins; |
37 |
|
38 |
|
38 |
use Koha::Exceptions::Hold; |
39 |
use Koha::Exceptions::Hold; |
39 |
|
40 |
|
Lines 112-117
sub suspend_hold {
Link Here
|
112 |
$self->suspend_until($date); |
113 |
$self->suspend_until($date); |
113 |
$self->store(); |
114 |
$self->store(); |
114 |
|
115 |
|
|
|
116 |
Koha::Plugins->call( |
117 |
'after_hold_action', |
118 |
{ |
119 |
action => 'suspend', |
120 |
payload => { hold => $self->get_from_storage } |
121 |
} |
122 |
); |
123 |
|
115 |
logaction( 'HOLDS', 'SUSPEND', $self->reserve_id, $self ) |
124 |
logaction( 'HOLDS', 'SUSPEND', $self->reserve_id, $self ) |
116 |
if C4::Context->preference('HoldsLog'); |
125 |
if C4::Context->preference('HoldsLog'); |
117 |
|
126 |
|
Lines 132-137
sub resume {
Link Here
|
132 |
|
141 |
|
133 |
$self->store(); |
142 |
$self->store(); |
134 |
|
143 |
|
|
|
144 |
Koha::Plugins->call( |
145 |
'after_hold_action', |
146 |
{ |
147 |
action => 'resume', |
148 |
payload => { hold => $self->get_from_storage } |
149 |
} |
150 |
); |
151 |
|
135 |
logaction( 'HOLDS', 'RESUME', $self->reserve_id, $self ) |
152 |
logaction( 'HOLDS', 'RESUME', $self->reserve_id, $self ) |
136 |
if C4::Context->preference('HoldsLog'); |
153 |
if C4::Context->preference('HoldsLog'); |
137 |
|
154 |
|
Lines 553-558
sub cancel {
Link Here
|
553 |
} |
570 |
} |
554 |
|
571 |
|
555 |
my $old_me = $self->_move_to_old; |
572 |
my $old_me = $self->_move_to_old; |
|
|
573 |
|
574 |
Koha::Plugins->call( |
575 |
'after_hold_action', |
576 |
{ |
577 |
action => 'cancel', |
578 |
payload => { hold => $old_me->get_from_storage } |
579 |
} |
580 |
); |
581 |
|
556 |
# anonymize if required |
582 |
# anonymize if required |
557 |
$old_me->anonymize |
583 |
$old_me->anonymize |
558 |
if $patron->privacy == 2; |
584 |
if $patron->privacy == 2; |
Lines 608-613
sub fill {
Link Here
|
608 |
); |
634 |
); |
609 |
|
635 |
|
610 |
my $old_me = $self->_move_to_old; |
636 |
my $old_me = $self->_move_to_old; |
|
|
637 |
|
638 |
Koha::Plugins->call( |
639 |
'after_hold_action', |
640 |
{ |
641 |
action => 'fill', |
642 |
payload => { hold => $old_me->get_from_storage } |
643 |
} |
644 |
); |
645 |
|
611 |
# anonymize if required |
646 |
# anonymize if required |
612 |
$old_me->anonymize |
647 |
$old_me->anonymize |
613 |
if $patron->privacy == 2; |
648 |
if $patron->privacy == 2; |
614 |
- |
|
|