Respond to currency changes.

This commit is contained in:
James Cole
2024-12-21 07:12:11 +01:00
parent 7fd5a88122
commit b52a1f3eb1
15 changed files with 234 additions and 45 deletions

View File

@@ -167,7 +167,7 @@ class ExchangeRateConverter
/** @var null|CurrencyExchangeRate $result */
$result = auth()->user()
->currencyExchangeRates()
?->currencyExchangeRates()
->where('from_currency_id', $from)
->where('to_currency_id', $to)
->where('date', '<=', $date)

View File

@@ -243,7 +243,7 @@ class AccountBalanceCalculator
$object->balance = $balance[0];
$object->date = $balance[1];
$object->date_tz = $balance[1]?->format('e');
$object->save();
$object->saveQuietly();
}
}
}