X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fe3df36071968d9f22c33f40adfc87717a578b1b..4826a1d124c8fede00d1c0ac9625a8e418d7978f:/SL/IS.pm diff --git a/SL/IS.pm b/SL/IS.pm index 24f8f0f17..1a36e2c9a 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,14 @@ sub customer_details { # remove id and taxincluded before copy back delete @$ref{qw(id taxincluded)}; + + @wanted_vars = grep({ $_ } @wanted_vars); + 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;