From: Moritz Bunkus Date: Mon, 10 Jan 2022 16:05:12 +0000 (+0100) Subject: Order-Controller: abweichende Rechnungsadresse nur bei Kunden behandeln X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~242 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c4b07238387eba288f94934a54847d1d432d3481;p=kivitendo-erp.git Order-Controller: abweichende Rechnungsadresse nur bei Kunden behandeln --- 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',