[Koha-patches] [PATCH] use HomeOrHoldingBranch to determine if a return is valid or not

paul.poulain at biblibre.com paul.poulain at biblibre.com
Tue Apr 1 16:01:36 CEST 2008


From: paul <paul.poulain at biblibre.com>

in fact, i'm not 100% sure of this bugfix : I don't see the case where a return should be done directly to homebranch, when the check out has been done at holdingbranch
so maybe we could hardcode 'holdingbranch' instead of using HomeOrHoldingBranch

the patch as written won't break anything existing.
---
 C4/Circulation.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index 0add08e..3ce79e3 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -1174,7 +1174,7 @@ sub AddReturn {
         }
     
         # check if the book is in a permanent collection....
-        my $hbr      = $iteminformation->{'homebranch'};
+        my $hbr      = $iteminformation->{C4::Context->preference("HomeOrHoldingBranch")};
         my $branches = GetBranches();
         if ( $hbr && $branches->{$hbr}->{'PE'} ) {
             $messages->{'IsPermanent'} = $hbr;
-- 
1.5.3.2




More information about the Koha-patches mailing list