Zeiterfassung: Lieferschein new_from_time_recording: undef-Warnung vermeiden
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 26 Apr 2021 11:43:55 +0000 (13:43 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 5 May 2021 15:25:03 +0000 (17:25 +0200)
SL/DB/DeliveryOrder.pm

index 039310b..1e0cb49 100644 (file)
@@ -231,7 +231,8 @@ sub new_from_time_recordings {
                                                ? nhimult(0.25, ($source->duration_in_hours))
                                                : _round_total($source->duration_in_hours);
     # add content if not already in description
-    my $new_description = $source->description_as_stripped_html;
+    my $new_description = '' . $source->description_as_stripped_html;
+    $entries->{$part_id}->{$date}->{content} ||= '';
     $entries->{$part_id}->{$date}->{content}  .= '<li>' . $new_description . '</li>'
       unless $entries->{$part_id}->{$date}->{content} =~ m/\Q$new_description/;