]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/IS.pm
Einkaufs-/Verkausfmasken: Wenn man auf "Liefeadresse" drückt, dann werden jetzt nur...
[kivitendo-erp.git] / SL / IS.pm
index 24f8f0f17f69c96e8cca5295a38c025f96c0ea82..cc8027b9ae0a98acc6d09f574e92eb225fe422f3 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -391,7 +391,7 @@ sub project_description {
 sub customer_details {
   $main::lxdebug->enter_sub();
 
-  my ($self, $myconfig, $form) = @_;
+  my ($self, $myconfig, $form, @wanted_vars) = @_;
 
   # connect to database
   my $dbh = $form->dbconnect($myconfig);
@@ -416,6 +416,13 @@ sub customer_details {
 
   # remove id and taxincluded before copy back
   delete @$ref{qw(id taxincluded)};
+
+  if (scalar(@wanted_vars) > 0) {
+    my %h_wanted_vars;
+    map({ $h_wanted_vars{$_} = 1; } @wanted_vars);
+    map({ delete($ref->{$_}) unless ($h_wanted_vars{$_}); } keys(%{$ref}));
+  }
+
   map { $form->{$_} = $ref->{$_} } keys %$ref;
   $sth->finish;