Meta files for new release.

This commit is contained in:
James Cole
2023-07-28 16:14:55 +02:00
parent 673f68b07c
commit 99009cff88
67 changed files with 381 additions and 239 deletions
@@ -183,13 +183,13 @@ trait ConvertsExchangeRates
$rate = $this->getFromDB((int)$currency->id, $euroId, $date->format('Y-m-d'));
if (null !== $rate) {
// app('log')->debug(sprintf('Rate for %s to EUR is %s.', $currency->code, $rate));
// app('log')->debug(sprintf('Rate for %s to EUR is %s.', $currency->code, $rate));
return $rate;
}
$rate = $this->getFromDB($euroId, (int)$currency->id, $date->format('Y-m-d'));
if (null !== $rate) {
$rate = bcdiv('1', $rate);
// app('log')->debug(sprintf('Inverted rate for %s to EUR is %s.', $currency->code, $rate));
// app('log')->debug(sprintf('Inverted rate for %s to EUR is %s.', $currency->code, $rate));
return $rate;
}
// grab backup values from config file:
@@ -200,7 +200,7 @@ trait ConvertsExchangeRates
return $backup;
}
// app('log')->debug(sprintf('No rate for %s to EUR.', $currency->code));
// app('log')->debug(sprintf('No rate for %s to EUR.', $currency->code));
return '0';
}
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/*
* ExchangeRateConverter.php
* Copyright (c) 2023 james@firefly-iii.org
+18 -12
View File
@@ -322,10 +322,16 @@ class Steam
$currentBalance = bcadd($currentBalance, $convertedAmount);
$balances[$format] = $currentBalance;
app('log')->debug(sprintf('%s: transaction in %s(!). Conversion rate is %s. %s %s = %s %s', $format, $currency->code, $rate,
$currency->code, $transaction['amount'],
$native->code, $convertedAmount
));
app('log')->debug(sprintf(
'%s: transaction in %s(!). Conversion rate is %s. %s %s = %s %s',
$format,
$currency->code,
$rate,
$currency->code,
$transaction['amount'],
$native->code,
$convertedAmount
));
}
@@ -446,14 +452,14 @@ class Steam
$rate = $converter->getCurrencyRate($currency, $native, $date);
$convertedAmount = bcmul($transaction['amount'], $rate);
$balance = bcadd($balance, $convertedAmount);
// app('log')->debug(sprintf('Date: %s, rate: %s, amount: %s %s, new: %s %s',
// $date->format('Y-m-d'),
// $rate,
// $currency->code,
// $transaction['amount'],
// $native->code,
// $convertedAmount
// ));
// app('log')->debug(sprintf('Date: %s, rate: %s, amount: %s %s, new: %s %s',
// $date->format('Y-m-d'),
// $rate,
// $currency->code,
// $transaction['amount'],
// $native->code,
// $convertedAmount
// ));
}
//app('log')->debug(sprintf('Balance from new set #%d is %f', $index, $balance));
}