From 2a26780514bb53cdd4e8df28a45db0df9d8cdad7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 27 Jul 2020 14:27:06 +0200 Subject: [PATCH] =?utf8?q?Wechselkurs=20pro=20Angebot/Auftrag:=20In=20Ange?= =?utf8?q?bots-/Auftragsbericht=20ber=C3=BCcksichtigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/OE.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SL/OE.pm b/SL/OE.pm index 144cb1cfd..418015e8c 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -121,9 +121,10 @@ sub transactions { qq| o.closed, o.delivered, o.quonumber, o.cusordnumber, o.shippingpoint, o.shipvia, | . qq| o.transaction_description, | . qq| o.marge_total, o.marge_percent, | . + qq| o.exchangerate, | . qq| o.itime::DATE AS insertdate, | . qq| department.description as department, | . - qq| ex.$rate AS exchangerate, | . + qq| ex.$rate AS daily_exchangerate, | . qq| pt.description AS payment_terms, | . qq| pr.projectnumber AS globalprojectnumber, | . qq| e.name AS employee, s.name AS salesman, | . @@ -384,7 +385,8 @@ SQL $ref->{remaining_amount} = $ref->{amount} - $ref->{billed_amount}; $ref->{remaining_netamount} = $ref->{netamount} - $ref->{billed_netamount}; } - $ref->{exchangerate} = 1 unless $ref->{exchangerate}; + $ref->{exchangerate} ||= $ref->{daily_exchangerate}; + $ref->{exchangerate} ||= 1; push @{ $form->{OE} }, $ref if $ref->{id} != $id{ $ref->{id} }; $id{ $ref->{id} } = $ref->{id}; } -- 2.20.1