get_lsits um payments eweitert
authorThomas Kasulke <t.kasulke@linet-services.de>
Fri, 4 May 2007 08:13:36 +0000 (08:13 +0000)
committerThomas Kasulke <t.kasulke@linet-services.de>
Fri, 4 May 2007 08:13:36 +0000 (08:13 +0000)
SL/Form.pm

index d59adee..6aedf1d 100644 (file)
@@ -1644,6 +1644,20 @@ $main::lxdebug->enter_sub();
   $main::lxdebug->leave_sub();
 }
 
+sub _get_payments {
+$main::lxdebug->enter_sub();
+
+  my ($self, $dbh, $key) = @_;
+
+  $key = "all_payments" unless ($key);
+
+  my $query = qq|SELECT * FROM payment_terms ORDER BY id|;
+  $self->{$key} = selectall_hashref_query($self, $dbh, $query);
+
+  $main::lxdebug->leave_sub();
+}
+
 sub _get_customers {
   $main::lxdebug->enter_sub();
 
@@ -1741,6 +1755,10 @@ sub get_lists {
   if($params{"vendors"}) {
     $self->_get_vendors($dbh, $params{"vendors"});
   }
+  
+  if($params{"payments"}) {
+    $self->_get_payments($dbh, $params{"payments"});
+  }
 
   $dbh->disconnect();