Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Not sure the brackets are nessecary, but I think I remember learning
bitwise operators have a lower priority than other relational
operators so wanted to make sure we notted the result of the bitwise
and, not the flag
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
if ($onloan){
$error = "book_on_loan"
}
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'}) )
C4::Context->preference("IndependantBranches") and
(C4::Context->userenv->{branch} ne
$item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'}) )