From 7cac5eaa6eb9d3236d1359f7bff8474d9960b64c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 27 Jul 2020 15:30:24 +0200 Subject: [PATCH] =?utf8?q?Auftrags-Controller:=20W=C3=A4hrung=20in=20make?= =?utf8?q?=5Forder=20setzen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Order.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index f06f06e03..d40d2eb47 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -1364,8 +1364,9 @@ sub make_order { # order here solves this problem. my $order; $order = SL::DB::Order->new(id => $::form->{id})->load(with => [ 'orderitems', 'orderitems.part' ]) if $::form->{id}; - $order ||= SL::DB::Order->new(orderitems => [], - quotation => (any { $self->type eq $_ } (sales_quotation_type(), request_quotation_type()))); + $order ||= SL::DB::Order->new(orderitems => [], + quotation => (any { $self->type eq $_ } (sales_quotation_type(), request_quotation_type())), + currency_id => $::instance_conf->get_currency_id()); my $cv_id_method = $self->cv . '_id'; if (!$::form->{id} && $::form->{$cv_id_method}) { @@ -1528,8 +1529,6 @@ sub setup_order_from_cv { sub recalc { my ($self) = @_; - $self->order->currency_id($::instance_conf->get_currency_id()) unless $self->order->currency_id; - my %pat = $self->order->calculate_prices_and_taxes(); $self->{taxes} = []; -- 2.20.1