Browse Source

Bug 27896: Remove DeleteTransfer from circ/

This patch replaces the DeleteTransfer call in circ/ with a
call to Koha::Item::Transfer->cancel.

Test plan
1/ Check an item out
2/ Add a transfer request for the item to a second library
3/ Attempt to check the item in at the first library
4/ Note that you should be given a 'WrongTransfer' modal and have to
option to cancel.
5/ Cancel the transfer
6/ Check in the database that the transfer now has 'datecancelled' set.
7/ Add a transfer for the item again
8/ From the transferstoreceive page cancel the transfer
9/ Click cancel and again check that datecancelled is set in the
database for your transfer

Signed-off-by: Petro Vashchuk <>

Signed-off-by: Kyle M Hall <>

Bug 27896: (follow-up) Fix Typo

Signed-off-by: Petro Vashchuk <>

Signed-off-by: Kyle M Hall <>

Signed-off-by: Jonathan Druart <>
1 changed files with 3 additions and 1 deletions
  1. +3

+ 3
- 1
circ/ View File

@@ -228,7 +228,9 @@ if ($dotransfer){

if ($canceltransfer){
my $item = Koha::Items->find($itemnumber);
my $transfer = $item->get_transfer;
$transfer->cancel({ reason => 'Manual', force => 1});
if($dest eq "ttr"){
print $query->redirect("/cgi-bin/koha/circ/");