Bug 6885 Follow up patch, invert tested condition
[koha_gimpoz] / C4 / Items.pm
index 8802a4c..cf716ab 100644 (file)
@@ -2211,7 +2211,7 @@ sub DelItemCheck {
     if ($onloan){
         $error = "book_on_loan" 
     }
-    elsif ( C4::Context->userenv->{flags} & 1 and
+    elsif ( !(C4::Context->userenv->{flags} & 1) and
             C4::Context->preference("IndependantBranches") and
            (C4::Context->userenv->{branch} ne
              $item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'}) )