Lines 35-40
use Koha::ERM::EUsage::UsageDataProvider;
Link Here
|
35 |
use Koha::ERM::EUsage::SushiCounter; |
35 |
use Koha::ERM::EUsage::SushiCounter; |
36 |
use Koha::Exceptions::ERM::EUsage::CounterFile; |
36 |
use Koha::Exceptions::ERM::EUsage::CounterFile; |
37 |
|
37 |
|
|
|
38 |
use C4::Context; |
39 |
|
38 |
use base qw(Koha::Object); |
40 |
use base qw(Koha::Object); |
39 |
|
41 |
|
40 |
use Koha::ERM::EUsage::CounterLogs; |
42 |
use Koha::ERM::EUsage::CounterLogs; |
Lines 558-567
Adds a erm_counter_logs database entry
Link Here
|
558 |
sub _add_counter_log_entry { |
560 |
sub _add_counter_log_entry { |
559 |
my ($self) = @_; |
561 |
my ($self) = @_; |
560 |
|
562 |
|
|
|
563 |
my $user = C4::Context->userenv()->{'number'}; |
561 |
Koha::ERM::EUsage::CounterLog->new( |
564 |
Koha::ERM::EUsage::CounterLog->new( |
562 |
{ |
565 |
{ |
563 |
#TODO: borrowernumber only required for manual uploads or "harvest now" button clicks |
566 |
#TODO: borrowernumber only required for manual uploads or "harvest now" button clicks |
564 |
borrowernumber => undef, |
567 |
borrowernumber => $user, |
565 |
counter_files_id => $self->erm_counter_files_id, |
568 |
counter_files_id => $self->erm_counter_files_id, |
566 |
importdate => $self->date_uploaded, |
569 |
importdate => $self->date_uploaded, |
567 |
filename => $self->filename, |
570 |
filename => $self->filename, |