koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/C4/Circulation Circ2.pm [rel_3_0]


From: LAURIN arnaud
Subject: [Koha-cvs] koha/C4/Circulation Circ2.pm [rel_3_0]
Date: Fri, 09 Feb 2007 18:00:42 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     LAURIN arnaud <alaurin> 07/02/09 18:00:42

Modified files:
        C4/Circulation : Circ2.pm 

Log message:
        changing criteria for branchtranfers launch ..., now the we check 
homebranch of document, not userenv->branch (if the document must returned to 
his homebranch) ....

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Circ2.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.114.2.40&r2=1.114.2.41

Patches:
Index: Circ2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.114.2.40
retrieving revision 1.114.2.41
diff -u -b -r1.114.2.40 -r1.114.2.41
--- Circ2.pm    9 Feb 2007 16:42:49 -0000       1.114.2.40
+++ Circ2.pm    9 Feb 2007 18:00:42 -0000       1.114.2.41
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Circ2.pm,v 1.114.2.40 2007/02/09 16:42:49 alaurin Exp $
+# $Id: Circ2.pm,v 1.114.2.41 2007/02/09 18:00:42 alaurin Exp $
 
 use strict;
 require Exporter;
@@ -41,7 +41,7 @@
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.114.2.40 $' =~ /\d+/g; 
shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.114.2.41 $' =~ /\d+/g; 
shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); };
 
 =head1 NAME
 
@@ -1590,8 +1590,9 @@
 if ( $iteminformation->{'holdingbranch'} ne C4::Context->userenv->{'branch'} )
         {
                
UpdateHoldingbranch(C4::Context->userenv->{'branch'},$iteminformation->{'itemnumber'});
+#              reload iteminformation holdingbranch with the userenv value
+               $iteminformation->{'holdingbranch'} = 
C4::Context->userenv->{'branch'};
         }
-        
     itemseen( $iteminformation->{'itemnumber'} );
     ($borrower) = getpatroninformation( \%env, $currentborrower, 0 );
     
@@ -1656,10 +1657,11 @@
     #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 .
     
-    if ( ($iteminformation->{'holdingbranch'} ne 
C4::Context->userenv->{'branch'}) and not $messages->{'WrongTransfer'} and 
($validTransfert ne 1) and ($reserveDone ne 1) ){
+    if ( ($iteminformation->{'holdingbranch'} ne 
$iteminformation->{'homebranch'}) and not $messages->{'WrongTransfer'} and 
($validTransfert ne 1) and ($reserveDone ne 1) ){
                if (C4::Context->preference("AutomaticItemReturn") == 1) {
                dotransfer($iteminformation->{'itemnumber'}, 
C4::Context->userenv->{'branch'}, $iteminformation->{'homebranch'});
                $messages->{'WasTransfered'} = 1;
+               warn "was transfered";
                }
     }
         




reply via email to

[Prev in Thread] Current Thread [Next in Thread]