Zeiterfassung: Konvertierung: Einträge ohne Dauer nicht bearbeiten
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 3 May 2021 12:23:44 +0000 (14:23 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 5 May 2021 15:25:03 +0000 (17:25 +0200)
SL/BackgroundJob/ConvertTimeRecordings.pm
SL/DB/DeliveryOrder.pm

index 906c8db..f44e711 100644 (file)
@@ -79,6 +79,8 @@ sub run {
 
   my $time_recordings = SL::DB::Manager::TimeRecording->get_all(where        => [date => { ge_lt => [ $from_date, $to_date ]},
                                                                                  or   => [booked => 0, booked => undef],
+                                                                                 '!duration' => 0,
+                                                                                 '!duration' => undef,
                                                                                  %customer_where],
                                                                 with_objects => ['customer']);
 
index 8bb89bd..f082db6 100644 (file)
@@ -202,6 +202,8 @@ sub new_from_time_recordings {
   my %part_by_part_id;
   my $entries;
   foreach my $source (@$sources) {
+    next if !$source->duration;
+
     my $part_id  = $source->part_id ? $source->part_id
                  : $default_part_id ? $default_part_id
                  : undef;