Bugzilla – Attachment 93191 Details for
Bug 7376
Transfer limits should be checked at check-in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
(ANOTHER IMPLEMENTATION) Bug 7376: Fix wrong indentation of CanBookBeReturned
Bug-7376-Fix-wrong-indentation-of-CanBookBeReturne.patch (text/plain), 2.34 KB, created by
Lari Taskula
on 2019-09-27 11:31:57 UTC
(
hide
)
Description:
(ANOTHER IMPLEMENTATION) Bug 7376: Fix wrong indentation of CanBookBeReturned
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2019-09-27 11:31:57 UTC
Size:
2.34 KB
patch
obsolete
>From f180c3356d547a3580f9c19788e4ea8bfeeebaa8 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >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 >--- > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7376
:
6954
|
21715
|
21805
|
22016
|
22017
|
22323
|
22357
|
22696
|
23168
|
76559
|
76866
|
76876
|
92740
|
92774
|
93190
|
93191
|
93192
|
93193
|
93194
|
93195
|
93196
|
107077
|
107078
|
107079
|
115369
|
115370
|
116493
|
116494
|
116927
|
116928
|
116937
|
116938
|
120897
|
120898
|
120899
|
120900
|
120901
|
120902
|
120903
|
144435
|
144436
|
144437
|
144438
|
144439
|
144440
|
144441
|
175690
|
175691
|
175692
|
175693
|
175694
|
175695
|
175696
|
175697