+ my $objects = $self->models->get;
+
+ my $total = sum0 map { _round_total($_->duration_in_hours) } @$objects;
+ my $total_h = int($total);
+ my $total_m = int($total * 60.0 + 0.5) % 60;
+ my $total_s = sprintf('%d:%02d', $total_h, $total_m);
+
+ push @$objects, make_control_row("separator");
+ push @$objects, make_control_row("data",
+ row => {
+ map( { $_ => {class => 'listtotal'} } keys %{$self->{report}->{columns}} ),
+ description => {data => t8('Total'), class => 'listtotal'},
+ duration => {data => $total_s, class => 'listtotal'}
+ });
+
+ $self->report_generator_list_objects(report => $self->{report}, objects => $objects);
+}
+
+sub action_mark_as_booked {
+ my ($self) = @_;
+
+ if (scalar @{ $::form->{ids} }) {
+ SL::DB::Manager::TimeRecording->update_all(
+ set => { booked => 1 },
+ where => [ id => $::form->{ids} ]
+ );
+ }
+
+ $self->redirect_to(safe_callback());