mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-22 08:57:17 -06:00
Revert the part of 923b01e2
which reverses currency quotes less than 1.
Now that GnuCash uses 64 bit numbers in numerics this is not necessary. It can store a number as small as 1e-9 with 9 significant digits.
This commit is contained in:
parent
df19244792
commit
5bd7875437
@ -168,7 +168,9 @@ if ($exchange eq "currency") {
|
||||
while ($#ARGV >= 0) {
|
||||
my $to = shift;
|
||||
my $result = $q->currency($from, $to);
|
||||
unless (defined($result) && $result >= 1) {
|
||||
# Sometimes quotes are available in only one direction.
|
||||
# If we didn't get the one we wanted try the reverse quote
|
||||
unless (defined($result)) {
|
||||
my $inv_res = $q->currency($to, $from);
|
||||
if (defined($inv_res)) {
|
||||
my $tmp = $to;
|
||||
|
@ -349,10 +349,8 @@ while(<>) {
|
||||
|
||||
my $price = $quoter->currency($from_currency, $to_currency);
|
||||
my $inv_price = undef;
|
||||
#Sometimes price quotes are available in only one direction, and if the
|
||||
#direction we asked for results in a quote < 1 we want the other direction
|
||||
#if it's available to get more significant digits.
|
||||
unless (defined($price) && $price > 1) {
|
||||
# Sometimes price quotes are available in only one direction.
|
||||
unless (defined($price)) {
|
||||
$inv_price = $quoter->currency($to_currency, $from_currency);
|
||||
if (defined($inv_price)) {
|
||||
my $tmp = $to_currency;
|
||||
|
Loading…
Reference in New Issue
Block a user