X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b66a38ca78330005029fa9bd950e11c4eb89f010..22f2c3e86aeea63b9e25b6ba249ca9062ae337f8:/SL/Controller/TimeRecording.pm diff --git a/SL/Controller/TimeRecording.pm b/SL/Controller/TimeRecording.pm index e852ba1a9..821512252 100644 --- a/SL/Controller/TimeRecording.pm +++ b/SL/Controller/TimeRecording.pm @@ -29,6 +29,7 @@ __PACKAGE__->run_before('check_auth'); __PACKAGE__->run_before('check_auth_edit', only => [ qw(edit save delete) ]); my %sort_columns = ( + date => t8('Date'), start_time => t8('Start'), end_time => t8('End'), customer => t8('Customer'), @@ -48,8 +49,8 @@ sub action_list { my ($self, %params) = @_; $::form->{filter} //= { - staff_member_id => SL::DB::Manager::Employee->current->id, - "start_time:date::ge" => DateTime->now_local->add(weeks => -2)->to_kivitendo, + staff_member_id => SL::DB::Manager::Employee->current->id, + "date:date::ge" => DateTime->today_local->add(weeks => -2)->to_kivitendo, }; $self->setup_list_action_bar; @@ -195,9 +196,11 @@ sub prepare_report { my $report = SL::ReportGenerator->new(\%::myconfig, $::form); $self->{report} = $report; - my @columns = qw(start_time end_time customer part project description staff_member duration booked); + my @columns = qw(date start_time end_time customer part project description staff_member duration booked); my %column_defs = ( + date => { text => t8('Date'), sub => sub { $_[0]->date_as_date }, + obj_link => sub { $self->url_for(action => 'edit', 'id' => $_[0]->id, callback => $self->models->get_callback) } }, start_time => { text => t8('Start'), sub => sub { $_[0]->start_time_as_timestamp }, obj_link => sub { $self->url_for(action => 'edit', 'id' => $_[0]->id, callback => $self->models->get_callback) } }, end_time => { text => t8('End'), sub => sub { $_[0]->end_time_as_timestamp },