@@ -, +, @@ --- C4/Circulation.pm | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -1139,26 +1139,26 @@ Returns: =cut sub CanBookBeReturned { - my ($item, $branch) = @_; - my $allowreturntobranch = C4::Context->preference("AllowReturnToBranch") || 'anywhere'; - - # assume return is allowed to start - my $allowed = 1; - my $message; - - # identify all cases where return is forbidden - if ($allowreturntobranch eq 'homebranch' && $branch ne $item->homebranch) { - $allowed = 0; - $message = $item->homebranch; - } elsif ($allowreturntobranch eq 'holdingbranch' && $branch ne $item->holdingbranch) { - $allowed = 0; - $message = $item->holdingbranch; - } elsif ($allowreturntobranch eq 'homeorholdingbranch' && $branch ne $item->homebranch && $branch ne $item->holdingbranch) { - $allowed = 0; - $message = $item->homebranch; # FIXME: choice of homebranch is arbitrary - } - - return ($allowed, $message); + my ($item, $branch) = @_; + my $allowreturntobranch = C4::Context->preference("AllowReturnToBranch") || 'anywhere'; + + # assume return is allowed to start + my $allowed = 1; + my $message; + + # identify all cases where return is forbidden + if ($allowreturntobranch eq 'homebranch' && $branch ne $item->homebranch) { + $allowed = 0; + $message = $item->homebranch; + } elsif ($allowreturntobranch eq 'holdingbranch' && $branch ne $item->holdingbranch) { + $allowed = 0; + $message = $item->holdingbranch; + } elsif ($allowreturntobranch eq 'homeorholdingbranch' && $branch ne $item->homebranch && $branch ne $item->holdingbranch) { + $allowed = 0; + $message = $item->homebranch; # FIXME: choice of homebranch is arbitrary + } + + return ($allowed, $message); } =head2 CheckHighHolds --