diff --git a/C4/Items.pm b/C4/Items.pm index d9c31f907e..9283b5c63e 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -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"; }