From: Bernd Bleßmann Date: Mon, 27 Jul 2020 12:27:06 +0000 (+0200) Subject: Wechselkurs pro Angebot/Auftrag: In Angebots-/Auftragsbericht berücksichtigen X-Git-Tag: release-3.5.6.1~91 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2a26780514bb53cdd4e8df28a45db0df9d8cdad7;p=kivitendo-erp.git Wechselkurs pro Angebot/Auftrag: In Angebots-/Auftragsbericht berücksichtigen --- 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}; }