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: Antoine Farnault
Subject: [Koha-cvs] koha/C4/Circulation Circ2.pm [rel_3_0]
Date: Tue, 05 Sep 2006 15:52:19 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Antoine Farnault <toins>        06/09/05 15:52:19

Modified files:
        C4/Circulation : Circ2.pm 

Log message:
        sync with dev_week.

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.2&r2=1.114.2.3

Patches:
Index: Circ2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.114.2.2
retrieving revision 1.114.2.3
diff -u -b -r1.114.2.2 -r1.114.2.3
--- Circ2.pm    31 Aug 2006 10:00:45 -0000      1.114.2.2
+++ Circ2.pm    5 Sep 2006 15:52:19 -0000       1.114.2.3
@@ -3,7 +3,7 @@
 
 package C4::Circulation::Circ2;
 
-# $Id: Circ2.pm,v 1.114.2.2 2006/08/31 10:00:45 toins Exp $
+# $Id: Circ2.pm,v 1.114.2.3 2006/09/05 15:52:19 toins Exp $
 
 #package to deal with Returns
 #written 3/11/99 by address@hidden
@@ -27,17 +27,23 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
-# use warnings;
+use warnings; no warnings 'uninitialized';
 require Exporter;
-use DBI;
+#use DBI;
 use C4::Context;
 use C4::Stats;
 use C4::Reserves2;
 use C4::Koha;
-use C4::Accounts2;
-use C4::Biblio;
-use Date::Manip;
 use C4::Biblio;
+#use C4::Accounts2;
+use Date::Calc qw(
+Today
+Today_and_Now
+Add_Delta_YM
+Add_Delta_DHMS
+Date_to_Days
+);
+#use Date::Manip;
 
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
@@ -275,7 +281,7 @@
        $borrower->{'authflags'} = $accessflagshash;
 
        # find out how long the membership lasts
-       my $sth=$dbh->prepare("select enrolmentperiod from categories where 
categorycode = ?");
+       $sth=$dbh->prepare("select enrolmentperiod from categories where 
categorycode = ?");
        $sth->execute($borrower->{'categorycode'});
        my $enrolment = $sth->fetchrow;
        $borrower->{'enrolmentperiod'} = $enrolment;
@@ -512,17 +518,18 @@
 #              $messages->{'ResFound'} = $resrec;
                $dotransfer = 1;
        }
-       
+       #actually do the transfer....
        if ($dotransfer) {
                dotransfer($iteminformation->{'itemnumber'}, $fbr, $tbr);
-               my $dbh= C4::Context->dbh;
-               my ($tagfield,$tagsubfield) = 
MARCfind_marc_from_kohafield($dbh,"items.holdingbranch");
-               my $bibid = MARCfind_MARCbibid_from_oldbiblionumber( $dbh, 
$iteminformation->{'biblionumber'} );
-               my $marcitem = MARCgetitem($dbh, $bibid, 
$iteminformation->{'itemnumber'});
-               if ($marcitem->field($tagfield)){
-                       $marcitem->field($tagfield)->update($tagsubfield=> 
$tbr);
-                       
MARCmoditem($dbh,$marcitem,$bibid,$iteminformation->{'itemnumber'});
-               }
+               # don't need to update MARC anymore, we do it in batch now
+               #my $dbh= C4::Context->dbh;
+               #my ($tagfield,$tagsubfield) = 
MARCfind_marc_from_kohafield($dbh,"items.holdingbranch");
+               #my $bibid = MARCfind_MARCbibid_from_oldbiblionumber( $dbh, 
$iteminformation->{'biblionumber'} );
+               #my $marcitem = MARCgetitem($dbh, $bibid, 
$iteminformation->{'itemnumber'});
+               #if ($marcitem->field($tagfield)){
+       #               $marcitem->field($tagfield)->update($tagsubfield=> 
$tbr);
+       #               
MARCmoditem($dbh,$marcitem,$bibid,$iteminformation->{'itemnumber'});
+       #       }
                $messages->{'WasTransfered'} = 1;
        }
        return ($dotransfer, $messages, $iteminformation);




reply via email to

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