Lines 65-71
C<$params> is an hashref whose expected keys are:
Link Here
|
65 |
other : sipmode |
65 |
other : sipmode |
66 |
itemtype : the type of the item |
66 |
itemtype : the type of the item |
67 |
ccode : the collection code of the item |
67 |
ccode : the collection code of the item |
68 |
categorycode : the categorycode of the patron |
68 |
categorycode : the categorycode of the patron |
|
|
69 |
interface : the context this action was taken in |
69 |
|
70 |
|
70 |
type key is mandatory. |
71 |
type key is mandatory. |
71 |
For types used in C4::Circulation (renew,issue,localuse,return), the following other keys are mandatory: |
72 |
For types used in C4::Circulation (renew,issue,localuse,return), the following other keys are mandatory: |
Lines 83-89
sub UpdateStats {
Link Here
|
83 |
# make some controls |
84 |
# make some controls |
84 |
return () if ! defined $params; |
85 |
return () if ! defined $params; |
85 |
# 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 |
86 |
my @allowed_keys = qw (type branch amount other itemnumber itemtype borrowernumber ccode location categorycode); |
87 |
my @allowed_keys = qw (type branch amount other itemnumber itemtype borrowernumber ccode location categorycode interface); |
87 |
my @allowed_circulation_types = qw (renew issue localuse return onsite_checkout recall); |
88 |
my @allowed_circulation_types = qw (renew issue localuse return onsite_checkout recall); |
88 |
my @allowed_accounts_types = qw (writeoff payment); |
89 |
my @allowed_accounts_types = qw (writeoff payment); |
89 |
my @circulation_mandatory_keys = qw (type branch borrowernumber itemnumber ccode itemtype); |
90 |
my @circulation_mandatory_keys = qw (type branch borrowernumber itemnumber ccode itemtype); |
Lines 125-130
sub UpdateStats {
Link Here
|
125 |
my $location = exists $params->{location} ? $params->{location} : undef; |
126 |
my $location = exists $params->{location} ? $params->{location} : undef; |
126 |
my $ccode = exists $params->{ccode} ? $params->{ccode} : ''; |
127 |
my $ccode = exists $params->{ccode} ? $params->{ccode} : ''; |
127 |
my $categorycode = exists $params->{categorycode} ? $params->{categorycode} : undef; |
128 |
my $categorycode = exists $params->{categorycode} ? $params->{categorycode} : undef; |
|
|
129 |
my $interface = exists $params->{interface} ? $params->{interface} : undef; |
128 |
|
130 |
|
129 |
my $dtf = Koha::Database->new->schema->storage->datetime_parser; |
131 |
my $dtf = Koha::Database->new->schema->storage->datetime_parser; |
130 |
my $statistic = Koha::Statistic->new( |
132 |
my $statistic = Koha::Statistic->new( |
Lines 140-145
sub UpdateStats {
Link Here
|
140 |
borrowernumber => $borrowernumber, |
142 |
borrowernumber => $borrowernumber, |
141 |
ccode => $ccode, |
143 |
ccode => $ccode, |
142 |
categorycode => $categorycode, |
144 |
categorycode => $categorycode, |
|
|
145 |
interface => $interface, |
143 |
} |
146 |
} |
144 |
)->store; |
147 |
)->store; |
145 |
|
148 |
|