projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8045752
)
Einträge am selben Tag nicht erneut in die Beschreibung aufnehmen
author
Jan Büren
<jan@kivitendo.de>
Wed, 6 Jan 2021 19:40:39 +0000
(20:40 +0100)
committer
Bernd Bleßmann
<bernd@kivitendo-premium.de>
Wed, 5 May 2021 15:25:03 +0000
(17:25 +0200)
SL/DB/DeliveryOrder.pm
patch
|
blob
|
history
diff --git
a/SL/DB/DeliveryOrder.pm
b/SL/DB/DeliveryOrder.pm
index
9e14c82
..
fef0ee5
100644
(file)
--- 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);
my $date = $source->start_time->to_kivitendo;
$entries->{$part_id}->{$date}->{duration} += _round_total($source->duration_in_hours);
- $entries->{$part_id}->{$date}->{content} .= '<li>' . $source->description_as_stripped_html . '</li>';
+ # add content if not already in description
+ my $new_description = $source->description_as_stripped_html;
+ $entries->{$part_id}->{$date}->{content} .= '<li>' . $new_description . '</li>'
+ unless $entries->{$part_id}->{$date}->{content} =~ m/\Q$new_description/;
+
$entries->{$part_id}->{$date}->{date_obj} = $source->start_time; # for sorting
}
$entries->{$part_id}->{$date}->{date_obj} = $source->start_time; # for sorting
}