-# goes through and manually changes the reserves record....
-# no attempt is made to check consistency.
-for (my $i=0;$i<$count;$i++){
- UpdateReserve($rank[$i],$biblionumber[$i],$borrower[$i],$branch[$i]); #from C4::Reserves2
+my $CancelBiblioNumber=$query->param('CancelBiblioNumber');
+my $CancelBorrowerNumber=$query->param('CancelBorrowerNumber');
+my $CancelItemnumber=$query->param('CancelItemnumber');
+
+# 2 possibilitys : cancel an item reservation, or modify or cancel the queded list
+
+# 1) cancel an item reservation by fonction ModReserveCancelAll (in reserves.pm)
+if ($CancelBorrowerNumber) {
+ ModReserveCancelAll($CancelItemnumber, $CancelBorrowerNumber);
+ $biblionumber[0] = $CancelBiblioNumber,