Bug 24295: Remove GetTransfers from request.pl
This patch replaces the call to GetTransfers in reserve.pl with the get_transfer method available from the Koha::Item object Test plan 1/ Place a reserve on an item at a different branch 2/ Trigger the transfer of the item 3/ Check the reserves page for the display of the current transfer status 4/ Apply patch 5/ Repeat step 3 Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
e6334cc360
commit
62512dc5d6
|
|
@ -37,7 +37,7 @@ use C4::Reserves qw( RevertWaitingStatus AlterPriority ToggleLowestPriority Togg
|
|||
use C4::Items qw( get_hostitemnumbers_of );
|
||||
use C4::Koha qw( getitemtypeimagelocation );
|
||||
use C4::Serials qw( CountSubscriptionFromBiblionumber );
|
||||
use C4::Circulation qw( GetTransfers _GetCircControlBranch GetBranchItemRule );
|
||||
use C4::Circulation qw( _GetCircControlBranch GetBranchItemRule );
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
use C4::Search qw( enabled_staff_search_views );
|
||||
|
||||
|
|
@ -450,13 +450,11 @@ if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold )
|
|||
}
|
||||
|
||||
# Check the transit status
|
||||
my ( $transfertwhen, $transfertfrom, $transfertto ) =
|
||||
GetTransfers($item_object->itemnumber); # FIXME replace with get_transfer
|
||||
|
||||
if ( defined $transfertwhen && $transfertwhen ne '' ) {
|
||||
$item->{transfertwhen} = $transfertwhen;
|
||||
$item->{transfertfrom} = $transfertfrom;
|
||||
$item->{transfertto} = $transfertto;
|
||||
my $transfer = $item_object->get_transfer;
|
||||
if ( $transfer && $transfer->in_transit ) {
|
||||
$item->{transfertwhen} = $transfer->datesent;
|
||||
$item->{transfertfrom} = $transfer->frombranch;
|
||||
$item->{transfertto} = $transfer->tobranch;
|
||||
$item->{nocancel} = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue