Weitere Unterfunktion zu Form::get_lists() zum Auslesen von Kunden-/Lieferantentypen.
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 4 Apr 2007 09:36:32 +0000 (09:36 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 4 Apr 2007 09:36:32 +0000 (09:36 +0000)
SL/Form.pm

index d6c7e2c..aebac40 100644 (file)
@@ -1622,6 +1622,18 @@ sub _get_employees {
   $main::lxdebug->leave_sub();
 }
 
+sub _get_business_types {
+  $main::lxdebug->enter_sub();
+
+  my ($self, $dbh, $key) = @_;
+
+  $key = "all_business_types" unless ($key);
+  $self->{$key} =
+    selectall_hashref_query($self, $dbh, qq|SELECT * FROM business|);
+
+  $main::lxdebug->leave_sub();
+}
+
 sub get_lists {
   $main::lxdebug->enter_sub();
 
@@ -1664,6 +1676,10 @@ sub get_lists {
     $self->_get_employees($dbh, $params{"employees"});
   }
 
+  if ($params{"business_types"}) {
+    $self->_get_business_types($dbh, $params{"business_types"});
+  }
+
   $dbh->disconnect();
 
   $main::lxdebug->leave_sub();