From ad718868553f149d0e9ea9ec7b7718677bac6c5e Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 28 Aug 2017 08:51:24 +0200 Subject: [PATCH] Bug 19004: [QA Follow-up] No need to check item-level_itypes again As Jonathan pointed out, GetItem already called effective_itemtype. So we can just use $item->{itype} here. Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart (cherry picked from commit 0e744d49b557e3401ae7b700b1410b022a4e851c) --- C4/Circulation.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 72cfc6d8aa..66c9ba7b39 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1835,10 +1835,7 @@ sub AddReturn { } my $itemnumber = $item->{ itemnumber }; - - my $item_level_itypes = C4::Context->preference("item-level_itypes"); - my $biblio = $item_level_itypes ? undef : GetBiblioData( $item->{ biblionumber } ); # don't get bib data unless we need it - my $itemtype = $item_level_itypes ? $item->{itype} : $biblio->{itemtype}; + my $itemtype = $item->{itype}; # GetItem called effective_itemtype my $issue = GetItemIssue($itemnumber); if ($issue and $issue->{borrowernumber}) { -- 2.39.5