mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 05:26:17 +00:00
Clean up balance methods.
This commit is contained in:
@@ -115,7 +115,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
private function getMetaBalances(Collection $accounts): void
|
||||
{
|
||||
try {
|
||||
$this->convertedBalances = app('steam')->balancesByAccountsConverted($accounts, $this->getDate());
|
||||
$this->convertedBalances = app('steam')->finalAccountsBalance($accounts, $this->getDate());
|
||||
} catch (FireflyException $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
@@ -172,14 +172,15 @@ class AccountTransformer extends AbstractTransformer
|
||||
|
||||
private function getBalanceDifference(Collection $accounts, Carbon $start, Carbon $end): void
|
||||
{
|
||||
throw new FireflyException('Used deprecated method, rethink this.');
|
||||
// collect balances, start and end for both native and converted.
|
||||
// yes the b is usually used for boolean by idiots but here it's for balance.
|
||||
$bStart = [];
|
||||
$bEnd = [];
|
||||
|
||||
try {
|
||||
$bStart = app('steam')->balancesByAccountsConverted($accounts, $start);
|
||||
$bEnd = app('steam')->balancesByAccountsConverted($accounts, $end);
|
||||
$bStart = app('steam')->finalAccountsBalance($accounts, $start);
|
||||
$bEnd = app('steam')->finalAccountsBalance($accounts, $end);
|
||||
} catch (FireflyException $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user