Bug 14842: Wrong call to GetBranchItemRule
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 17 Sep 2015 08:03:59 +0000 (09:03 +0100)
committerTomas Cohen Arazi <tomascohen@unc.edu.ar>
Fri, 2 Oct 2015 14:06:39 +0000 (11:06 -0300)
From bug 7981:

GetBranchItemRule expects an itemtype, a scalar.
Here $itemtype is a hashref returned by C4::ItemType->get.
So $itemtype->{itemtype} should be passed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
circ/returns.pl

index ec0679f..637f4b2 100755 (executable)
@@ -276,7 +276,7 @@ if ($barcode) {
     }
 
     # make sure return branch respects home branch circulation rules, default to homebranch
-    my $hbr = GetBranchItemRule($biblio->{'homebranch'}, $itemtype)->{'returnbranch'} || "homebranch";
+    my $hbr = GetBranchItemRule($biblio->{'homebranch'}, $itemtype->{itemtype})->{'returnbranch'} || "homebranch";
     my $returnbranch = $biblio->{$hbr} ;
 
     $template->param(