X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8cdaa6f0c4bb9b3c1dcdd18335e67f4c4842aaa4..eb8d3de878876804b0465ec7cde9adfff436a5a0:/SL/OE.pm diff --git a/SL/OE.pm b/SL/OE.pm index 18daae128..72c11ed32 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -415,7 +415,7 @@ sub save { $exchangerate = $form->check_exchangerate($myconfig, $form->{currency}, $form->{transdate}, ($form->{vc} eq 'customer') ? 'buy' : 'sell'); } - $form->{exchangerate} = ($exchangerate) ? $exchangerate : $form->parse_amount($myconfig, $form->{exchangerate}); + $form->{exchangerate} = $exchangerate || $form->parse_amount($myconfig, $form->{exchangerate}); my $quotation = $form->{type} =~ /_order$/ ? 'f' : 't'; @@ -620,7 +620,7 @@ sub retrieve { my $ref = selectfirst_hashref_query($form, $dbh, $query); map { $form->{$_} = $ref->{$_} } keys %$ref; - ($form->{currency}) = split(/:/, $form->{currencies}); + ($form->{currency}) = split(/:/, $form->{currencies}) unless ($form->{currency}); # set reqdate if this is an invoice->order conversion. If someone knows a better check to ensure # we come from invoices, feel free.