|
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 545-551
sub cancel {
Link Here
|
| 545 |
} |
562 |
} |
| 546 |
} |
563 |
} |
| 547 |
|
564 |
|
| 548 |
$self->_move_to_old; |
565 |
my $old_me = $self->_move_to_old; |
|
|
566 |
|
| 567 |
Koha::Plugins->call( |
| 568 |
'after_hold_action', |
| 569 |
{ |
| 570 |
action => 'cancel', |
| 571 |
payload => { hold => $old_me->get_from_storage } |
| 572 |
} |
| 573 |
); |
| 574 |
|
| 549 |
$self->SUPER::delete(); # Do not add a DELETE log |
575 |
$self->SUPER::delete(); # Do not add a DELETE log |
| 550 |
|
576 |
|
| 551 |
# now fix the priority on the others.... |
577 |
# now fix the priority on the others.... |
| 552 |
- |
|
|