X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/b0e933c22e7c0824042376d647e65e568f0c45d2..f83b4aff417ab78fc4bc242298fe25924f1ee072:/SL/IS.pm diff --git a/SL/IS.pm b/SL/IS.pm index 24f8f0f17..cc8027b9a 100644 --- 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;