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:
daaac66
)
Payment-Helfer: Rechnen mit undefinierten Werten vermeiden
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 18 Aug 2016 12:08:57 +0000
(14:08 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 18 Aug 2016 13:42:43 +0000
(15:42 +0200)
SL/DB/Helper/Payment.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Helper/Payment.pm
b/SL/DB/Helper/Payment.pm
index
b7bf38a
..
64d6a63
100644
(file)
--- a/
SL/DB/Helper/Payment.pm
+++ b/
SL/DB/Helper/Payment.pm
@@
-387,7
+387,7
@@
sub open_amount {
# if the difference is 0.01 Cent this may end up as 0.009999999999998
# numerically, so round this value when checking for cent threshold >= 0.01
- return
$self->amount - $self->paid
;
+ return
($self->amount // 0) - ($self->paid // 0)
;
};
sub open_percent {