use Modern::Perl;
use C4::Stats;
-use Test::More tests => 17;
+use Test::More tests => 18;
BEGIN {
use_ok('C4::Stats');
amount =>5.1,
other => "bla",
itemtype => "BK",
+ location => "LOC",
accountno => 51,
ccode => "CODE",
};
amount =>5.1,
other => "bla",
itemtype => "BK",
+ location => "LOC",
accountno => 51,
ccode => "CODE",
type => "return"
my $sth = $dbh->prepare("SELECT * FROM statistics");
$sth->execute();
my $line = ${ $sth->fetchall_arrayref( {} ) }[0];
-is ($params-> {branch}, $line->{branch}, "UpdateStats save branch param in branch field of statistics table");
-is ($params-> {type}, $line->{type}, "UpdateStats save type param in type field of statistics table");
-is ($params-> {borrowernumber}, $line->{borrowernumber}, "UpdateStats save borrowernumber param in borrowernumber field of statistics table");
-cmp_ok($params-> {amount},'==', $line->{value}, "UpdateStats save amount param in value field of statistics table");
-is ($params-> {other}, $line->{other}, "UpdateStats save other param in other field of statistics table");
-is ($params-> {itemtype}, $line->{itemtype}, "UpdateStats save itemtype param in itemtype field of statistics table");
-is ($params-> {accountno}, $line->{proccode}, "UpdateStats save accountno param in proccode field of statistics table");
-is ($params-> {ccode}, $line->{ccode}, "UpdateStats save ccode param in ccode field of statistics table");
+is ($params->{branch}, $line->{branch}, "UpdateStats save branch param in branch field of statistics table");
+is ($params->{type}, $line->{type}, "UpdateStats save type param in type field of statistics table");
+is ($params->{borrowernumber}, $line->{borrowernumber}, "UpdateStats save borrowernumber param in borrowernumber field of statistics table");
+cmp_ok($params->{amount},'==', $line->{value}, "UpdateStats save amount param in value field of statistics table");
+is ($params->{other}, $line->{other}, "UpdateStats save other param in other field of statistics table");
+is ($params->{itemtype}, $line->{itemtype}, "UpdateStats save itemtype param in itemtype field of statistics table");
+is ($params->{location}, $line->{location}, "UpdateStats save location param in location field of statistics table");
+is ($params->{accountno}, $line->{proccode}, "UpdateStats save accountno param in proccode field of statistics table");
+is ($params->{ccode}, $line->{ccode}, "UpdateStats save ccode param in ccode field of statistics table");
#
# Test TotalPaid