]> wagnertech.de Git - mfinanz.git/blobdiff - SL/AM.pm
AM::convert_unit - wenn keine units übergeben, alle laden.
[mfinanz.git] / SL / AM.pm
index df8bf23e510f5414a6baf0ffcf5309919264e54f..891e5f87c4179cbae5ae477a6854b720b2dac9ef 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};