]> wagnertech.de Git - kivitendo-erp.git/blobdiff - bin/mozilla/am.pl
Beim Anlegen einer Einheit bei allen Einheiten nachsehen, ob es eine Einheit mit...
[kivitendo-erp.git] / bin / mozilla / am.pl
index 42aa6d5b250d35b12dda9908d3496178c2f6f171..e39d1193a1b38312ac80fee5fbb25728db6d5ddc 100644 (file)
@@ -3618,7 +3618,8 @@ sub add_unit {
 
   $form->isblank("new_name", $locale->text("The name is missing."));
   $units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"});
-  $form->show_generic_error($locale->text("A unit with this name does already exist.")) if ($units->{$form->{"new_name"}});
+  $all_units = AM->retrieve_units(\%myconfig, $form);
+  $form->show_generic_error($locale->text("A unit with this name does already exist.")) if ($all_units->{$form->{"new_name"}});
 
   my ($base_unit, $factor);
   if ($form->{"new_base_unit"}) {