From 2851ec9a444d93086dc5356122b7143711d955c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Wed, 6 Jan 2021 20:40:39 +0100 Subject: [PATCH] =?utf8?q?Eintr=C3=A4ge=20am=20selben=20Tag=20nicht=20erne?= =?utf8?q?ut=20in=20die=20Beschreibung=20aufnehmen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/DeliveryOrder.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 9e14c82a1..fef0ee5a3 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -227,7 +227,11 @@ sub new_from_time_recordings { my $date = $source->start_time->to_kivitendo; $entries->{$part_id}->{$date}->{duration} += _round_total($source->duration_in_hours); - $entries->{$part_id}->{$date}->{content} .= '
  • ' . $source->description_as_stripped_html . '
  • '; + # add content if not already in description + my $new_description = $source->description_as_stripped_html; + $entries->{$part_id}->{$date}->{content} .= '
  • ' . $new_description . '
  • ' + unless $entries->{$part_id}->{$date}->{content} =~ m/\Q$new_description/; + $entries->{$part_id}->{$date}->{date_obj} = $source->start_time; # for sorting } -- 2.20.1