From: Felix Eichler Date: Mon, 15 Apr 2019 08:57:46 +0000 (+0200) Subject: exchangerate bei Order erst nach transdate und currency_id setzen X-Git-Tag: release-3.5.6.1~107 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=035b4835c424c6893b5449555ce5489171704ba4;p=kivitendo-erp.git exchangerate bei Order erst nach transdate und currency_id setzen (cherry picked from commit 7d76676faf4c3a4d71fc5df449365374a9997995) (cherry pick von odyn) --- 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}) {