Fix various code.

This commit is contained in:
James Cole
2025-05-27 17:06:15 +02:00
parent d8f512ca3a
commit 2cb14f6b72
123 changed files with 581 additions and 500 deletions

View File

@@ -215,7 +215,6 @@ class AccountBalanceGrouped
private function getDataKey(array $journal): string
{
$key = 'spent';
// deposit = incoming
// transfer or reconcile or opening balance, and these accounts are the destination.
if (
@@ -230,10 +229,10 @@ class AccountBalanceGrouped
&& in_array($journal['destination_account_id'], $this->accountIds, true)
)
) {
$key = 'earned';
return 'earned';
}
return $key;
return 'spent';
}
private function getRate(TransactionCurrency $currency, Carbon $date): string