SL::DB::Unit::compatible_units: alle Einheiten gecachet laden
[kivitendo-erp.git] / SL / DB / Manager / Unit.pm
index f081af4..673fcb0 100644 (file)
@@ -41,4 +41,9 @@ sub convertible_to_filter {
   return ("${prefix}name" => [ map { $_->name } @{ $unit->convertible_units } ]);
 }
 
+sub all_units {
+  my ($class) = @_;
+  $::request->cache('all_units')->{sorted} //= $class->get_all_sorted;
+}
+
 1;