X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/072caebf05b59b8b74f7f5699d99129834bab616..a8cba95a2844190deb3efd99ba37294981981234:/SL/DO.pm diff --git a/SL/DO.pm b/SL/DO.pm index 2cfd43d6e..ed4d2f516 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -746,15 +746,14 @@ sub retrieve { $sth = prepare_execute_query($form, $dbh, $query, $form->{id}); $ref = $sth->fetchrow_hashref("NAME_lc"); - delete $ref->{id}; - map { $form->{$_} = $ref->{$_} } keys %$ref; + $form->{$_} = $ref->{$_} for grep { m{^shipto(?!_id$)} } keys %$ref; $sth->finish(); - if ($form->{shipto_id}) { + if ($ref->{shipto_id}) { my $cvars = CVar->get_custom_variables( dbh => $dbh, module => 'ShipTo', - trans_id => $form->{shipto_id}, + trans_id => $ref->{shipto_id}, ); $form->{"shiptocvar_$_->{name}"} = $_->{value} for @{ $cvars }; }