From: Sven Schöling Date: Fri, 20 Jan 2012 16:14:55 +0000 (+0100) Subject: AM::convert_unit - wenn keine units übergeben, alle laden. X-Git-Tag: release-2.7.0beta1~28 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=23551aa675eb5966b8135e8797243364e709965f;p=kivitendo-erp.git AM::convert_unit - wenn keine units übergeben, alle laden. --- diff --git a/SL/AM.pm b/SL/AM.pm index df8bf23e5..891e5f87c 100644 --- 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};