X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/2632ced6322ae7837105306b55d82448b750fe9d..2851ec9a444d93086dc5356122b7143711d955c0:/SL/DB/DeliveryOrder.pm diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 9bb76f2f4..fef0ee5a3 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -186,7 +186,7 @@ sub new_from_time_recordings { my %args = ( is_sales => 1, - delivered => 1, + delivered => 0, customer_id => $sources->[0]->customer_id, taxzone_id => $sources->[0]->customer->taxzone_id, currency_id => $sources->[0]->customer->currency_id, @@ -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 }