]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Form.pm
2 Warnungen in den Tests beseitigen
[mfinanz.git] / SL / Form.pm
index f35327873d3ec8e0689689cd93f73ee5588e8656..7030454d6989cab2428bae6f3ff6bf438b9db4a1 100644 (file)
@@ -2365,8 +2365,13 @@ sub get_lists {
   my $dbh = $self->get_standard_dbh(\%main::myconfig);
   my ($sth, $query, $ref);
 
-  my $vc = $self->{"vc"} eq "customer" ? "customer" : "vendor";
-  my $vc_id = $self->{"${vc}_id"};
+  my ($vc, $vc_id);
+  if ($params{contacts} || $params{shipto}) {
+    $vc = 'customer' if $self->{"vc"} eq "customer";
+    $vc = 'vendor'   if $self->{"vc"} eq "vendor";
+    die "invalid use of get_lists, need 'vc'";
+    $vc_id = $self->{"${vc}_id"};
+  }
 
   if ($params{"contacts"}) {
     $self->_get_contacts($dbh, $vc_id, $params{"contacts"});