From 8170645f84be2b1f4c8e527258e58117ae2e0593 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 16 Mar 2020 13:49:01 +0100 Subject: [PATCH] Bug 23463: Replace new occurrence of AddItem Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- Koha/Illrequest.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index a11ff8601f..cd5a593151 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -39,7 +39,6 @@ use Koha::Biblios; use Koha::Items; use Koha::ItemTypes; use Koha::Libraries; -use C4::Items qw( AddItem ); use C4::Circulation qw( CanBookBeIssued AddIssue ); use base qw(Koha::Object); @@ -1166,15 +1165,15 @@ sub check_out { my $itemnumber; if ($item_count == 0) { my $item_hash = { + biblionumber => $self->biblio_id, homebranch => $params->{branchcode}, holdingbranch => $params->{branchcode}, location => $params->{branchcode}, itype => $params->{item_type}, barcode => 'ILL-' . $self->illrequest_id }; - my (undef, undef, $item_no) = - AddItem($item_hash, $self->biblio_id); - $itemnumber = $item_no; + my $item = Koha::Item->new($item_hash); + $itemnumber = $item->itemnumber; } else { $itemnumber = $items[0]->itemnumber; } -- 2.39.5