From 8028e5d8e990eecee7c33a1ff9954e426b0e9887 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Fri, 30 Aug 2019 16:31:17 +0000 Subject: [PATCH] Bug 7376: Fix wrong indentation of CanBookBeReturned To test: 1. git diff -w --word-diff-regex=[^[:space:]] HEAD~1 2. Observe no differences (above cmd ignores space changes) 3. Therefore patch only includes whitespace changes Sponsored-by: National Library of Finland --- C4/Circulation.pm | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index dd24308894..c693105df5 100644 --- a/C4/Circulation.pm +++ b/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 -- 2.17.1