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:
c696ba2
)
AM::convert_unit - wenn keine units übergeben, alle laden.
author
Sven Schöling
<s.schoeling@linet-services.de>
Fri, 20 Jan 2012 16:14:55 +0000
(17:14 +0100)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Fri, 20 Jan 2012 18:45:50 +0000
(19:45 +0100)
SL/AM.pm
patch
|
blob
|
history
diff --git
a/SL/AM.pm
b/SL/AM.pm
index
df8bf23
..
891e5f8
100644
(file)
--- a/
SL/AM.pm
+++ b/
SL/AM.pm
@@
-1509,6
+1509,10
@@
sub convert_unit {
$main::lxdebug->enter_sub(2);
my ($this, $a, $b, $all_units) = @_;
+ if (!$all_units) {
+ $all_units = $this->retrieve_all_units;
+ }
+
$main::lxdebug->leave_sub(2) and return 0 unless $a && $b;
$main::lxdebug->leave_sub(2) and return 0 unless $all_units->{$a} && $all_units->{$b};
$main::lxdebug->leave_sub(2) and return 0 unless $all_units->{$a}{base_unit} eq $all_units->{$b}{base_unit};