From 035b4835c424c6893b5449555ce5489171704ba4 Mon Sep 17 00:00:00 2001 From: Felix Eichler Date: Mon, 15 Apr 2019 10:57:46 +0200 Subject: [PATCH] exchangerate bei Order erst nach transdate und currency_id setzen (cherry picked from commit 7d76676faf4c3a4d71fc5df449365374a9997995) (cherry pick von odyn) --- SL/Controller/Order.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 541984740..5363e18a9 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -1372,6 +1372,7 @@ sub make_order { my $form_orderitems = delete $::form->{order}->{orderitems}; my $form_periodic_invoices_config = delete $::form->{order}->{periodic_invoices_config}; + my $exchangerate = delete $::form->{order}->{exchangerate}; $order->assign_attributes(%{$::form->{order}}); @@ -1380,6 +1381,9 @@ sub make_order { $periodic_invoices_config->assign_attributes(%$periodic_invoices_config_attrs); } + # set exchangerate after transdate and currency_id + $order->assign_attributes(exchangerate => $exchangerate); + # remove deleted items $self->item_ids_to_delete([]); foreach my $idx (reverse 0..$#{$order->orderitems}) { -- 2.20.1