X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDO.pm;h=b51fc0f1bf15ee199d7003cdf54f53d902b3c7db;hb=0e04ddd7e3ff23d051838617844698a39f680969;hp=b087becdd0f8939656270940f144e8c7634f743e;hpb=98b64fe1e380c232428d63cea0eb5f44b1d1a2c3;p=kivitendo-erp.git diff --git a/SL/DO.pm b/SL/DO.pm index b087becdd..b51fc0f1b 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -25,7 +25,8 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1335, USA. #====================================================================== # # Delivery Order entry module @@ -745,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 }; } @@ -1302,7 +1302,7 @@ sub get_shipped_qty { my @dolinks = RecordLinks->get_links('dbh' => $dbh, 'from_table' => 'oe', 'to_table' => 'delivery_orders', - 'from_id' => @oe_ids); + 'from_id' => \@oe_ids); my @do_ids = map { $_->{to_id} } @dolinks ; if (scalar (@do_ids) == 0) {