mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Remove all uses of "finalAccountBalance", move towards one function to rule them all.
This commit is contained in:
		| @@ -197,10 +197,16 @@ class ReconcileController extends Controller | ||||
| 
 | ||||
|         $currency       = $this->accountRepos->getAccountCurrency($account) ?? $this->primaryCurrency; | ||||
|         // correct
 | ||||
|         Log::debug(sprintf('transactions: Call finalAccountBalance with date/time "%s"', $startDate->toIso8601String())); | ||||
|         Log::debug(sprintf('transactions2: Call finalAccountBalance with date/time "%s"', $end->toIso8601String())); | ||||
|         $startBalance   = Steam::bcround(Steam::finalAccountBalance($account, $startDate)['balance'], $currency->decimal_places); | ||||
|         $endBalance     = Steam::bcround(Steam::finalAccountBalance($account, $end)['balance'], $currency->decimal_places); | ||||
|         Log::debug(sprintf('transactions: Call accountsBalancesOptimized with date/time "%s"', $startDate->toIso8601String())); | ||||
|         Log::debug(sprintf('transactions2: Call accountsBalancesOptimized with date/time "%s"', $end->toIso8601String())); | ||||
| 
 | ||||
|         // 2025-10-08 replace finalAccountBalance with accountsBalancesOptimized
 | ||||
| //        $startBalance   = Steam::bcround(Steam::finalAccountBalance($account, $startDate)['balance'], $currency->decimal_places);
 | ||||
| //        $endBalance     = Steam::bcround(Steam::finalAccountBalance($account, $end)['balance'], $currency->decimal_places);
 | ||||
| 
 | ||||
|         $startBalance = Steam::accountsBalancesOptimized(new Collection()->push($account), $startDate)[$account->id]; | ||||
|         $endBalance = Steam::accountsBalancesOptimized(new Collection()->push($account), $end)[$account->id]; | ||||
| 
 | ||||
| 
 | ||||
|         // get the transactions
 | ||||
|         $selectionStart = clone $start; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user