(bug #2750) Cannot return to another branch if the independantbranch option is set...
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Tue, 23 Dec 2008 14:14:27 +0000 (15:14 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 26 May 2009 19:15:19 +0000 (21:15 +0200)
The code was modified to change the holding branch ONLY if the return to the right branch is done. If you set IndependantBranch to on, you must return the document to the HomeBranch.
And verify the return is done before show the message that allow to transfert the document to another branch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
C4/Circulation.pm

index af8ccef..86a107c 100644 (file)
@@ -1435,7 +1435,11 @@ sub AddReturn {
         #adding message if holdingbranch is non equal a userenv branch to return the document to homebranch
         #we check, if we don't have reserv or transfert for this document, if not, return it to homebranch .
         
+<<<<<<< HEAD:C4/Circulation.pm
         if ($doreturn and ($iteminformation->{'holdingbranch'} ne $iteminformation->{'homebranch'}) and not $messages->{'WrongTransfer'} and ($validTransfert ne 1) and ($reserveDone ne 1) ){
+=======
+        if ($doreturn and ($branch ne $iteminformation->{'homebranch'}) and not $messages->{'WrongTransfer'} and ($validTransfert ne 1) and ($reserveDone ne 1) ){
+>>>>>>> be5e89b... (bug #2750) Cannot return to another branch if the independantbranch option is set as ON:C4/Circulation.pm
                        if (C4::Context->preference("AutomaticItemReturn") == 1) {
                                ModItemTransfer($iteminformation->{'itemnumber'}, C4::Context->userenv->{'branch'}, $iteminformation->{'homebranch'});
                                $messages->{'WasTransfered'} = 1;