[Koha-cvs] koha/C4 Stats.pm

Chris Cormack chris at katipo.co.nz
Thu Jun 1 03:42:19 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	
Changes by:	Chris Cormack <rangi at savannah.gnu.org>	06/06/01 01:42:19

Modified files:
	C4             : Stats.pm 

Log message:
	Stores an associated borrowernumber now with issue data, if the system pref is set.
	Otherwise there is no difference

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Stats.pm.diff?tr1=1.22&tr2=1.23&r1=text&r2=text

Patches:
Index: koha/C4/Stats.pm
diff -u koha/C4/Stats.pm:1.22 koha/C4/Stats.pm:1.23
--- koha/C4/Stats.pm:1.22	Thu Aug 25 23:15:34 2005
+++ koha/C4/Stats.pm	Thu Jun  1 01:42:19 2006
@@ -1,6 +1,6 @@
 package C4::Stats;
 
-# $Id: Stats.pm,v 1.22 2005/08/25 23:15:34 rangi Exp $
+# $Id: Stats.pm,v 1.23 2006/06/01 01:42:19 rangi Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -26,7 +26,8 @@
 use vars qw($VERSION @ISA @EXPORT);
 
 # set the version for version checking
-$VERSION = 0.01;
+$VERSION = $VERSION = do { my @v = '$Revision: 1.23 $' =~ /\d+/g;
+    shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };;
 
 =head1 NAME
 
@@ -78,11 +79,12 @@
                 $branch=$env->{'branchcode'};
         }
         my $user = $env->{'usercode'};
+        my $organisation = $env->{'organisation'};
         print $borrowernumber;
         # FIXME - Use $dbh->do() instead
         my $sth=$dbh->prepare("Insert into statistics (datetime,branch,type,usercode,value,
-                                        other,itemnumber,itemtype,borrowernumber,proccode) values (now(),?,?,?,?,?,?,?,?,?)");
-        $sth->execute($branch,$type,$user,$amount,$other,$itemnum,$itemtype,$borrowernumber,$accountno);
+                                        other,itemnumber,itemtype,borrowernumber,proccode,associatedborrower) values (now(),?,?,?,?,?,?,?,?,?,?)");
+        $sth->execute($branch,$type,$user,$amount,$other,$itemnum,$itemtype,$borrowernumber,$accountno,$organisation);
         $sth->finish;
 }
 





More information about the Koha-cvs mailing list