From: Bernd Bleßmann Date: Mon, 3 May 2021 12:23:44 +0000 (+0200) Subject: Zeiterfassung: Konvertierung: Einträge ohne Dauer nicht bearbeiten X-Git-Tag: kivitendo-mebil_0.1-0~9^2~276 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=68f05425f0189affa3a9e75d3d7e43d2405dd21f;p=kivitendo-erp.git Zeiterfassung: Konvertierung: Einträge ohne Dauer nicht bearbeiten --- diff --git a/SL/BackgroundJob/ConvertTimeRecordings.pm b/SL/BackgroundJob/ConvertTimeRecordings.pm index 906c8dba4..f44e71110 100644 --- a/SL/BackgroundJob/ConvertTimeRecordings.pm +++ b/SL/BackgroundJob/ConvertTimeRecordings.pm @@ -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']); diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 8bb89bd86..f082db6ae 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -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;