From b4d500daabb1ce364ae4e6c99d3d9bfa5482aad8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 24 Jul 2020 14:03:34 +0200 Subject: [PATCH] =?utf8?q?Auftrags-Controller:=20Wechselkurs:=20Preis=20be?= =?utf8?q?im=20Hinzuf=C3=BCgen=20eines=20Artikels=20umrechnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Order.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 5d3049267..18ce1eb45 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -1044,9 +1044,11 @@ sub action_update_row_from_master_data { $price_src = $price_source->best_price ? $price_source->best_price : $price_source->price_from_source(""); + $price_src->price($::form->round_amount($price_src->price / $self->order->exchangerate, 5)) if $self->order->exchangerate; $price_src->price(0) if !$price_source->best_price; } + $item->sellprice($price_src->price); $item->active_price_source($price_src); @@ -1463,8 +1465,9 @@ sub new_item { $price_src->price($item->sellprice); } else { $price_src = $price_source->best_price - ? $price_source->best_price - : $price_source->price_from_source(""); + ? $price_source->best_price + : $price_source->price_from_source(""); + $price_src->price($::form->round_amount($price_src->price / $record->exchangerate, 5)) if $record->exchangerate; $price_src->price(0) if !$price_source->best_price; } -- 2.20.1