From b81bb697a42471528ba2e139c20afd383cca27de Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 1 Oct 2012 13:36:48 -0400 Subject: [PATCH] Bug 8213 - "Cancel All" button on holds over tab cancels both holds over and holds waiting Signed-off-by: Melia Meggs Signed-off-by: Chris Cormack Signed-off-by: Paul Poulain --- circ/waitingreserves.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index c9c9f0e921..ec3feb55f2 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -96,12 +96,6 @@ foreach my $num (@getreserves) { my $holdingbranch = $gettitle->{'holdingbranch'}; my $homebranch = $gettitle->{'homebranch'}; - if ($cancelall) { - my $res = cancel( $itemnumber, $borrowernum, $holdingbranch, $homebranch, !$transfer_when_cancel_all ); - push @cancel_result, $res if $res; - next; - } - my %getreserv = ( itemnumber => $itemnumber, borrowernum => $borrowernum, @@ -139,8 +133,14 @@ foreach my $num (@getreserves) { } if ($today > $calcDate) { - push @overloop, \%getreserv; - $overcount++; + if ($cancelall) { + my $res = cancel( $itemnumber, $borrowernum, $holdingbranch, $homebranch, !$transfer_when_cancel_all ); + push @cancel_result, $res if $res; + next; + } else { + push @overloop, \%getreserv; + $overcount++; + } }else{ push @reservloop, \%getreserv; $reservcount++; -- 2.39.5