X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b0e933c22e7c0824042376d647e65e568f0c45d2..f83b4aff417ab78fc4bc242298fe25924f1ee072:/SL/IR.pm diff --git a/SL/IR.pm b/SL/IR.pm index 5a4a2d7f9..a6f66659e 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -1222,7 +1222,7 @@ sub retrieve_item { sub vendor_details { $main::lxdebug->enter_sub(); - my ($self, $myconfig, $form) = @_; + my ($self, $myconfig, $form, @wanted_vars) = @_; # connect to database my $dbh = $form->dbconnect($myconfig); @@ -1249,6 +1249,13 @@ sub vendor_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;