From 3e38feb58a07e5e60fdde726fe90199958bbc653 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) (cherry picked from commit ad718868553f149d0e9ea9ec7b7718677bac6c5e) Signed-off-by: Katrin Fischer --- C4/Circulation.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index fa3e866e67..e409ae1856 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1832,10 +1832,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