Lines 84-90
sub UpdateStats {
Link Here
|
84 |
# make some controls |
84 |
# make some controls |
85 |
return () if ! defined $params; |
85 |
return () if ! defined $params; |
86 |
# change these arrays if new types of transaction or new parameters are allowed |
86 |
# change these arrays if new types of transaction or new parameters are allowed |
87 |
my @allowed_keys = qw (type branch amount other itemnumber itemtype borrowernumber accountno ccode); |
87 |
my @allowed_keys = qw (type branch amount other itemnumber itemtype borrowernumber accountno ccode location); |
88 |
my @allowed_circulation_types = qw (renew issue localuse return onsite_checkout); |
88 |
my @allowed_circulation_types = qw (renew issue localuse return onsite_checkout); |
89 |
my @allowed_accounts_types = qw (writeoff payment); |
89 |
my @allowed_accounts_types = qw (writeoff payment); |
90 |
my @circulation_mandatory_keys = qw (type branch borrowernumber itemnumber ccode itemtype); |
90 |
my @circulation_mandatory_keys = qw (type branch borrowernumber itemnumber ccode itemtype); |
Lines 123-128
sub UpdateStats {
Link Here
|
123 |
my $amount = exists $params->{amount} ? $params->{amount} :''; |
123 |
my $amount = exists $params->{amount} ? $params->{amount} :''; |
124 |
my $other = exists $params->{other} ? $params->{other} :''; |
124 |
my $other = exists $params->{other} ? $params->{other} :''; |
125 |
my $itemtype = exists $params->{itemtype} ? $params->{itemtype} :''; |
125 |
my $itemtype = exists $params->{itemtype} ? $params->{itemtype} :''; |
|
|
126 |
my $location = exists $params->{location} ? $params->{location} :''; |
126 |
my $accountno = exists $params->{accountno} ? $params->{accountno} :''; |
127 |
my $accountno = exists $params->{accountno} ? $params->{accountno} :''; |
127 |
my $ccode = exists $params->{ccode} ? $params->{ccode} :''; |
128 |
my $ccode = exists $params->{ccode} ? $params->{ccode} :''; |
128 |
|
129 |
|
Lines 131-144
sub UpdateStats {
Link Here
|
131 |
"INSERT INTO statistics |
132 |
"INSERT INTO statistics |
132 |
(datetime, |
133 |
(datetime, |
133 |
branch, type, value, |
134 |
branch, type, value, |
134 |
other, itemnumber, itemtype, |
135 |
other, itemnumber, itemtype, location, |
135 |
borrowernumber, proccode, ccode) |
136 |
borrowernumber, proccode, ccode) |
136 |
VALUES (now(),?,?,?,?,?,?,?,?,?)" |
137 |
VALUES (now(),?,?,?,?,?,?,?,?,?,?)" |
137 |
); |
138 |
); |
138 |
$sth->execute( |
139 |
$sth->execute( |
139 |
$branch, $type, $amount, |
140 |
$branch, $type, $amount, $other, |
140 |
$other, $itemnumber, $itemtype, |
141 |
$itemnumber, $itemtype, $location, $borrowernumber, |
141 |
$borrowernumber, $accountno, $ccode |
142 |
$accountno, $ccode |
142 |
); |
143 |
); |
143 |
} |
144 |
} |
144 |
|
145 |
|