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:
6b89ba3
)
SL::DB::Unit: Warnungen wegen nicht initialisierten Werten vermeiden
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 30 Aug 2019 13:01:10 +0000
(15:01 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 30 Aug 2019 13:01:10 +0000
(15:01 +0200)
Durch Tests getriggert, konkret: durch t/wh/transfer.t
SL/DB/Unit.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Unit.pm
b/SL/DB/Unit.pm
index
f5f1bc1
..
508aa74
100644
(file)
--- a/
SL/DB/Unit.pm
+++ b/
SL/DB/Unit.pm
@@
-57,7
+57,7
@@
sub convert_to {
my $my_base_factor = $self->base_factor || 1;
my $other_base_factor = $other_unit->base_factor || 1;
- return
$qty
* $my_base_factor / $other_base_factor;
+ return
($qty // 0)
* $my_base_factor / $other_base_factor;
}
sub is_time_based {