From 0cc091d22311ce204228904b7b409598d480cdd7 Mon Sep 17 00:00:00 2001 From: rangi Date: Thu, 1 Jun 2006 01:42:19 +0000 Subject: [PATCH] Stores an associated borrowernumber now with issue data, if the system pref is set. Otherwise there is no difference --- C4/Stats.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/Stats.pm b/C4/Stats.pm index b1529e3e1f..86ee905cc5 100644 --- a/C4/Stats.pm +++ b/C4/Stats.pm @@ -26,7 +26,8 @@ use C4::Context; use vars qw($VERSION @ISA @EXPORT); # set the version for version checking -$VERSION = 0.01; +$VERSION = $VERSION = do { my @v = '$Revision$' =~ /\d+/g; + shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };; =head1 NAME @@ -78,11 +79,12 @@ sub UpdateStats { $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; } -- 2.20.1