Lines 43-54
use Koha::Patrons;
Link Here
|
43 |
|
43 |
|
44 |
my $input = new CGI; |
44 |
my $input = new CGI; |
45 |
|
45 |
|
|
|
46 |
my $op = $input->param('op') || ''; |
46 |
my $item = $input->param('itemnumber'); |
47 |
my $item = $input->param('itemnumber'); |
47 |
my $borrowernumber = $input->param('borrowernumber'); |
48 |
my $borrowernumber = $input->param('borrowernumber'); |
48 |
my $fbr = $input->param('fbr') || ''; |
49 |
my $fbr = $input->param('fbr') || ''; |
49 |
my $tbr = $input->param('tbr') || ''; |
50 |
my $tbr = $input->param('tbr') || ''; |
50 |
my $all_branches = $input->param('allbranches') || ''; |
51 |
my $all_branches = $input->param('allbranches') || ''; |
51 |
my $cancelall = $input->param('cancelall'); |
|
|
52 |
my $tab = $input->param('tab'); |
52 |
my $tab = $input->param('tab'); |
53 |
|
53 |
|
54 |
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( |
54 |
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( |
Lines 69-75
$template->param( TransferWhenCancelAllWaitingHolds => 1 ) if $transfer_when_can
Link Here
|
69 |
|
69 |
|
70 |
my @cancel_result; |
70 |
my @cancel_result; |
71 |
# if we have a return from the form we cancel the holds |
71 |
# if we have a return from the form we cancel the holds |
72 |
if ($item) { |
72 |
if ( $op eq 'cancel_reserve' and $item) { |
73 |
my $res = cancel( $item, $borrowernumber, $fbr, $tbr ); |
73 |
my $res = cancel( $item, $borrowernumber, $fbr, $tbr ); |
74 |
push @cancel_result, $res if $res; |
74 |
push @cancel_result, $res if $res; |
75 |
} |
75 |
} |
Lines 138-144
foreach my $num (@getreserves) {
Link Here
|
138 |
} |
138 |
} |
139 |
|
139 |
|
140 |
if ($today > $calcDate) { |
140 |
if ($today > $calcDate) { |
141 |
if ($cancelall) { |
141 |
if ($op eq 'cancel_all') { |
142 |
my $res = cancel( $itemnumber, $borrowernum, $holdingbranch, $homebranch, !$transfer_when_cancel_all ); |
142 |
my $res = cancel( $itemnumber, $borrowernum, $holdingbranch, $homebranch, !$transfer_when_cancel_all ); |
143 |
push @cancel_result, $res if $res; |
143 |
push @cancel_result, $res if $res; |
144 |
next; |
144 |
next; |
Lines 167-175
$template->param(
Link Here
|
167 |
# Checking if there is a Fast Cataloging Framework |
167 |
# Checking if there is a Fast Cataloging Framework |
168 |
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); |
168 |
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); |
169 |
|
169 |
|
170 |
if ($item && $tab eq 'holdsover' && !@cancel_result) { |
170 |
if ($op eq 'cancel_reserve' && $tab eq 'holdsover' && !@cancel_result) { |
171 |
print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover"); |
171 |
print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover"); |
172 |
} elsif ($cancelall) { |
172 |
} elsif ($op eq 'cancel_all') { |
173 |
print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl"); |
173 |
print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl"); |
174 |
} else { |
174 |
} else { |
175 |
output_html_with_http_headers $input, $cookie, $template->output; |
175 |
output_html_with_http_headers $input, $cookie, $template->output; |