mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 01:06:46 +00:00
Remove some logs.
This commit is contained in:
@@ -82,7 +82,7 @@ class NetWorth implements NetWorthInterface
|
||||
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
Log::debug(sprintf('Now at account #%d ("%s")', $account->id, $account->name));
|
||||
// Log::debug(sprintf('Now at account #%d ("%s")', $account->id, $account->name));
|
||||
$currency = $this->accountRepository->getAccountCurrency($account) ?? $default;
|
||||
$useNative = $convertToNative && $default->id !== $currency->id;
|
||||
$currency = $useNative ? $default : $currency;
|
||||
@@ -93,12 +93,12 @@ class NetWorth implements NetWorthInterface
|
||||
$balance = $balances[$account->id]['balance'] ?? '0';
|
||||
$nativeBalance = $balances[$account->id]['native_balance'] ?? '0';
|
||||
}
|
||||
Log::debug(sprintf('Balance is %s, native balance is %s', $balance, $nativeBalance));
|
||||
// Log::debug(sprintf('Balance is %s, native balance is %s', $balance, $nativeBalance));
|
||||
// always subtract virtual balance again.
|
||||
$balance = '' !== (string) $account->virtual_balance ? bcsub($balance, (string) $account->virtual_balance) : $balance;
|
||||
$nativeBalance = '' !== (string) $account->native_virtual_balance ? bcsub($nativeBalance, (string) $account->native_virtual_balance) : $nativeBalance;
|
||||
$amountToUse = $useNative ? $nativeBalance : $balance;
|
||||
Log::debug(sprintf('Will use %s %s', $currencyCode, $amountToUse));
|
||||
// Log::debug(sprintf('Will use %s %s', $currencyCode, $amountToUse));
|
||||
|
||||
$netWorth[$currencyCode] ??= [
|
||||
'balance' => '0',
|
||||
|
@@ -71,12 +71,12 @@ class TransactionSummarizer
|
||||
$foreignCurrencyDecimalPlaces = null;
|
||||
|
||||
if ($this->convertToNative) {
|
||||
Log::debug('convertToNative is true.');
|
||||
// Log::debug('convertToNative is true.');
|
||||
// if convert to native, use the native amount yes or no?
|
||||
$useNative = $this->default->id !== (int) $journal['currency_id'];
|
||||
$useForeign = $this->default->id === (int) $journal['foreign_currency_id'];
|
||||
if ($useNative) {
|
||||
Log::debug(sprintf('Journal #%d switches to native amount (original is %s)', $journal['transaction_journal_id'], $journal['currency_code']));
|
||||
// Log::debug(sprintf('Journal #%d switches to native amount (original is %s)', $journal['transaction_journal_id'], $journal['currency_code']));
|
||||
$field = 'native_amount';
|
||||
$currencyId = $this->default->id;
|
||||
$currencyName = $this->default->name;
|
||||
@@ -85,7 +85,7 @@ class TransactionSummarizer
|
||||
$currencyDecimalPlaces = $this->default->decimal_places;
|
||||
}
|
||||
if ($useForeign) {
|
||||
Log::debug(sprintf('Journal #%d switches to foreign amount (foreign is %s)', $journal['transaction_journal_id'], $journal['foreign_currency_code']));
|
||||
// Log::debug(sprintf('Journal #%d switches to foreign amount (foreign is %s)', $journal['transaction_journal_id'], $journal['foreign_currency_code']));
|
||||
$field = 'foreign_amount';
|
||||
$currencyId = (int) $journal['foreign_currency_id'];
|
||||
$currencyName = $journal['foreign_currency_name'];
|
||||
@@ -95,7 +95,7 @@ class TransactionSummarizer
|
||||
}
|
||||
}
|
||||
if (!$this->convertToNative) {
|
||||
Log::debug('convertToNative is false.');
|
||||
// Log::debug('convertToNative is false.');
|
||||
// use foreign amount?
|
||||
$foreignCurrencyId = (int) $journal['foreign_currency_id'];
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
|
Reference in New Issue
Block a user