Merge branch 'bug_7593' into 3.14-master
[koha.git] / C4 / Items.pm
index d9c31f9..9283b5c 100644 (file)
@@ -2213,10 +2213,9 @@ sub DelItemCheck {
     if ($onloan){
         $error = "book_on_loan" 
     }
-    elsif ( !(C4::Context->userenv->{flags} & 1) and
-            C4::Context->preference("IndependantBranches") and
-           (C4::Context->userenv->{branch} ne
-             $item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'}) )
+    elsif ( !( C4::Context->userenv->{flags} & 1 )
+        and C4::Context->preference("IndependantBranches")
+        and ( C4::Context->userenv->{branch} ne $item->{'homebranch'} ) )
     {
         $error = "not_same_branch";
     }