Lines 33-39
use List::MoreUtils qw( uniq );
Link Here
|
33 |
use Date::Calc qw( Date_to_Days ); |
33 |
use Date::Calc qw( Date_to_Days ); |
34 |
use C4::Output qw( output_html_with_http_headers ); |
34 |
use C4::Output qw( output_html_with_http_headers ); |
35 |
use C4::Auth qw( get_template_and_user ); |
35 |
use C4::Auth qw( get_template_and_user ); |
36 |
use C4::Reserves qw( RevertWaitingStatus AlterPriority ToggleLowestPriority ToggleSuspend CanBookBeReserved GetMaxPatronHoldsForRecord CanItemBeReserved IsAvailableForItemLevelRequest ); |
36 |
use C4::Reserves qw( RevertWaitingStatus AlterPriority ToggleLowestPriority CanBookBeReserved GetMaxPatronHoldsForRecord CanItemBeReserved IsAvailableForItemLevelRequest ); |
37 |
use C4::Items qw( get_hostitemnumbers_of ); |
37 |
use C4::Items qw( get_hostitemnumbers_of ); |
38 |
use C4::Koha qw( getitemtypeimagelocation ); |
38 |
use C4::Koha qw( getitemtypeimagelocation ); |
39 |
use C4::Serials qw( CountSubscriptionFromBiblionumber ); |
39 |
use C4::Serials qw( CountSubscriptionFromBiblionumber ); |
Lines 120-129
elsif ( $op eq 'cud-setLowestPriority' ) {
Link Here
|
120 |
my $reserve_id = $input->param('reserve_id'); |
120 |
my $reserve_id = $input->param('reserve_id'); |
121 |
ToggleLowestPriority($reserve_id); |
121 |
ToggleLowestPriority($reserve_id); |
122 |
} |
122 |
} |
123 |
elsif ( $op eq 'cud-toggleSuspend' ) { |
123 |
elsif ( $op eq 'cud-suspend' ) { |
124 |
my $reserve_id = $input->param('reserve_id'); |
124 |
my $reserve_id = $input->param('reserve_id'); |
125 |
my $suspend_until = $input->param('suspend_until'); |
125 |
my $suspend_until = $input->param('suspend_until'); |
126 |
ToggleSuspend( $reserve_id, $suspend_until ); |
126 |
my $hold = Koha::Holds->find($reserve_id); |
|
|
127 |
$hold->suspend_hold($suspend_until) if $hold; |
128 |
} elsif ( $op eq 'cud-unsuspend' ) { |
129 |
my $reserve_id = $input->param('reserve_id'); |
130 |
my $hold = Koha::Holds->find($reserve_id); |
131 |
$hold->resume() if $hold; |
127 |
} |
132 |
} |
128 |
elsif ( $op eq 'cud-cancel_bulk' ) { |
133 |
elsif ( $op eq 'cud-cancel_bulk' ) { |
129 |
my $cancellation_reason = $input->param("cancellation-reason"); |
134 |
my $cancellation_reason = $input->param("cancellation-reason"); |