From f359cafc18432c1e20050e25b6e1729dc742ec1f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 16 Jan 2020 15:32:17 +0000 Subject: [PATCH] Bug 24434: Remove updateWrongTransfer This patch simply removes the unused updateWrongTransfer method from C4::Circulation. Test plan: Read code and varify that the method would never actually be triggered. --- C4/Circulation.pm | 26 -------------------------- circ/returns.pl | 5 ----- 2 files changed, 31 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index c3629c2472..e4ded839af 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -115,7 +115,6 @@ BEGIN { &transferbook &GetTransfers &GetTransfersFromTo - &updateWrongTransfer &DeleteTransfer &IsBranchTransferAllowed &CreateBranchTransferLimit @@ -3468,31 +3467,6 @@ sub SendCirculationAlert { return; } -=head2 updateWrongTransfer - - $items = updateWrongTransfer($itemNumber,$borrowernumber,$waitingAtLibrary,$FromLibrary); - -This function validate the line of brachtransfer but with the wrong destination (mistake from a librarian ...), and create a new line in branchtransfer from the actual library to the original library of reservation - -=cut - -sub updateWrongTransfer { - my ( $itemNumber,$waitingAtLibrary,$FromLibrary ) = @_; - my $dbh = C4::Context->dbh; -# first step validate the actual line of transfert . - my $sth = - $dbh->prepare( - "update branchtransfers set datearrived = now(),tobranch=?,comments='wrongtransfer' where itemnumber= ? AND datearrived IS NULL" - ); - $sth->execute($FromLibrary,$itemNumber); - -# second step create a new line of branchtransfer to the right location . - ModItemTransfer($itemNumber, $FromLibrary, $waitingAtLibrary); - -#third step changing holdingbranch of item - UpdateHoldingbranch($FromLibrary,$itemNumber); -} - =head2 UpdateHoldingbranch $items = UpdateHoldingbranch($branch,$itmenumber); diff --git a/circ/returns.pl b/circ/returns.pl index a9e2bc243c..4b338e4796 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -142,11 +142,6 @@ foreach ( $query->param ) { ############ # Deal with the requests.... - -if ($query->param('WT-itemNumber')){ - updateWrongTransfer ($query->param('WT-itemNumber'),$query->param('WT-waitingAt'),$query->param('WT-From')); -} - if ( $query->param('reserve_id') ) { my $itemnumber = $query->param('itemnumber'); my $borrowernumber = $query->param('borrowernumber'); -- 2.20.1