[Koha-patches] [PATCH] (bug #4050) update datelastseen even if document isn't on loan

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Tue Jan 19 11:50:23 CET 2010


this change the place of moddatelastseen to be used each time a document is checked in, even if the document is not on loan.
---
 C4/Circulation.pm |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index dffe593..93f1981 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -1420,14 +1420,16 @@ sub AddReturn {
             $doreturn = 0;
         }
     
-
+    # We know the document was just seen
+    ModDateLastSeen( $iteminformation->{'itemnumber'} );
+        
     #     new op dev : if the book returned in an other branch update the holding branch
     
     # update issues, thereby returning book (should push this out into another subroutine
         $borrower = C4::Members::GetMemberDetails( $iteminformation->{borrowernumber}, 0 );
     
     # case of a return of document (deal with issues and holdingbranch)
-    
+            
         if ($doreturn) {
 			my $circControlBranch = _GetCircControlBranch($iteminformation,$borrower);
 			if($dropbox) {
@@ -1442,9 +1444,7 @@ sub AddReturn {
             # We update the holdingbranch from circControlBranch variable
             UpdateHoldingbranch($branch,$iteminformation->{'itemnumber'});
             $iteminformation->{'holdingbranch'} = $branch;
-        
-            
-            ModDateLastSeen( $iteminformation->{'itemnumber'} );
+
             ModItem({ onloan => undef }, $biblio->{'biblionumber'}, $iteminformation->{'itemnumber'});
 
             if ($iteminformation->{borrowernumber}){
-- 
1.6.3.3




More information about the Koha-patches mailing list