Revision 73cff733
Von Jan Büren vor fast 4 Jahren hinzugefügt
SL/DB/DeliveryOrder.pm | ||
---|---|---|
21 | 21 |
|
22 | 22 |
use List::Util qw(first notall); |
23 | 23 |
use List::MoreUtils qw(any); |
24 |
use Math::Round qw(nhimult); |
|
24 | 25 |
|
25 | 26 |
__PACKAGE__->meta->add_relationship(orderitems => { type => 'one to many', |
26 | 27 |
class => 'SL::DB::DeliveryOrderItem', |
... | ... | |
226 | 227 |
} |
227 | 228 |
|
228 | 229 |
my $date = $source->start_time->to_kivitendo; |
229 |
$entries->{$part_id}->{$date}->{duration} += _round_total($source->duration_in_hours); |
|
230 |
$entries->{$part_id}->{$date}->{duration} += $source->{rounding} ? |
|
231 |
nhimult(0.25, ($source->duration_in_hours)) |
|
232 |
: _round_total($source->duration_in_hours); |
|
230 | 233 |
# add content if not already in description |
231 | 234 |
my $new_description = $source->description_as_stripped_html; |
232 | 235 |
$entries->{$part_id}->{$date}->{content} .= '<li>' . $new_description . '</li>' |
Auch abrufbar als: Unified diff
Abhängig vom Rundungsverfahren minuten- oder viertelstundengenau abrechnen