X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/4e8e33e9c0a98f10551a4ae18597dc724e621a13..731991d49695123cea7a6de1d7c8b0e649d2dba2:/SL/OE.pm 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}; }