X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FStats.pm;h=0afd810d4f5ca86af6c5b9dab54977b54a93bcde;hb=970e90b3091c1ef54b9d57e6287a112f1977c887;hp=d0bf7a56945385e82640cc817078544eb496f706;hpb=e3e8f09a3ed0851baa2d4bd8640dba3e88d589a5;p=koha.git diff --git a/C4/Stats.pm b/C4/Stats.pm index d0bf7a5694..0afd810d4f 100644 --- a/C4/Stats.pm +++ b/C4/Stats.pm @@ -72,18 +72,18 @@ sub UpdateStats { my ( $branch, $type, $amount, $other, $itemnum, - $itemtype, $borrowernumber + $itemtype, $borrowernumber, $accountno ) = @_; my $dbh = C4::Context->dbh; - # FIXME - Use $dbh->do() instead my $sth = $dbh->prepare( - "Insert into statistics (datetime,branch,type,value, - other,itemnumber,itemtype,borrowernumber) values (now(),?,?,?,?,?,?,?)" + "INSERT INTO statistics (datetime,branch,type,value, + other,itemnumber,itemtype,borrowernumber,proccode) VALUES (now(),?,?,?,?,?,?,?,?)" ); $sth->execute( $branch, $type, $amount, $other, $itemnum, $itemtype, $borrowernumber, + $accountno ); $sth->finish; } @@ -109,6 +109,7 @@ sub TotalPaid { $query .= " ORDER BY branch, type"; } my $sth = $dbh->prepare($query); +warn $query; $sth->execute(); my @results; while ( my $data = $sth->fetchrow_hashref ) {