X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ce06f68492a003aa81e3b00fe9fb58618bdb5263..e4d533e65a92149137848134f8a97efb67d89a23:/SL/Controller/Order.pm diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index c8cc6ea24..24ad4a565 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -766,8 +766,10 @@ sub action_show_customer_vendor_details_dialog { $details{payment_terms} = $cv->payment->description if $cv->payment; $details{pricegroup} = $cv->pricegroup->pricegroup if $is_customer && $cv->pricegroup; - foreach my $entry (@{ $cv->additional_billing_addresses }) { - push @{ $details{ADDITIONAL_BILLING_ADDRESSES} }, { map { $_ => $entry->$_ } @{$entry->meta->columns} }; + if ($is_customer) { + foreach my $entry (@{ $cv->additional_billing_addresses }) { + push @{ $details{ADDITIONAL_BILLING_ADDRESSES} }, { map { $_ => $entry->$_ } @{$entry->meta->columns} }; + } } foreach my $entry (@{ $cv->shipto }) { push @{ $details{SHIPTO} }, { map { $_ => $entry->$_ } @{$entry->meta->columns} }; @@ -1341,6 +1343,8 @@ sub build_contact_select { sub build_billing_address_select { my ($self) = @_; + return '' if $self->cv ne 'customer'; + select_tag('order.billing_address_id', [ {displayable_id => '', id => ''}, $self->order->{$self->cv}->additional_billing_addresses ], value_key => 'id',