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:
2851ec9
)
Abhängig vom Rundungsverfahren minuten- oder viertelstundengenau abrechnen
author
Jan Büren
<jan@kivitendo.de>
Wed, 6 Jan 2021 19:41:19 +0000
(20:41 +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
fef0ee5
..
dd1791b
100644
(file)
--- a/
SL/DB/DeliveryOrder.pm
+++ b/
SL/DB/DeliveryOrder.pm
@@
-21,6
+21,7
@@
use SL::Helper::Number qw(_format_total _round_total);
use List::Util qw(first notall);
use List::MoreUtils qw(any);
use List::Util qw(first notall);
use List::MoreUtils qw(any);
+use Math::Round qw(nhimult);
__PACKAGE__->meta->add_relationship(orderitems => { type => 'one to many',
class => 'SL::DB::DeliveryOrderItem',
__PACKAGE__->meta->add_relationship(orderitems => { type => 'one to many',
class => 'SL::DB::DeliveryOrderItem',
@@
-226,7
+227,9
@@
sub new_from_time_recordings {
}
my $date = $source->start_time->to_kivitendo;
}
my $date = $source->start_time->to_kivitendo;
- $entries->{$part_id}->{$date}->{duration} += _round_total($source->duration_in_hours);
+ $entries->{$part_id}->{$date}->{duration} += $source->{rounding} ?
+ 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;
$entries->{$part_id}->{$date}->{content} .= '<li>' . $new_description . '</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>'