From: Bernd Bleßmann Date: Fri, 24 Jul 2020 12:03:34 +0000 (+0200) Subject: Auftrags-Controller: Wechselkurs: Preis beim Hinzufügen eines Artikels umrechnen X-Git-Tag: release-3.5.6.1~92 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b4d500daabb1ce364ae4e6c99d3d9bfa5482aad8;p=kivitendo-erp.git Auftrags-Controller: Wechselkurs: Preis beim Hinzufügen eines Artikels umrechnen --- 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; }