mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-22 08:56:39 -06:00
Fix commands
This commit is contained in:
parent
b8d1d7a8c0
commit
7ca39fdb21
@ -27,6 +27,6 @@ class CorrectAccountBalance extends Command
|
||||
|
||||
private function correctBalanceAmounts(): void
|
||||
{
|
||||
AccountBalanceCalculator::recalculate(null, null);
|
||||
AccountBalanceCalculator::recalculateAll();
|
||||
}
|
||||
}
|
||||
|
@ -40,12 +40,12 @@ class TransactionObserver
|
||||
public function updated(Transaction $transaction): void
|
||||
{
|
||||
app('log')->debug('Observe "updated" of a transaction.');
|
||||
AccountBalanceCalculator::recalculateForAccount($transaction->account);
|
||||
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
|
||||
}
|
||||
|
||||
public function created(Transaction $transaction): void
|
||||
{
|
||||
app('log')->debug('Observe "created" of a transaction.');
|
||||
AccountBalanceCalculator::recalculateForAccount($transaction->account);
|
||||
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class AccountBalanceCalculator
|
||||
{
|
||||
$object = new self;
|
||||
$object->recalculateLatest(null);
|
||||
$object->recalculateJournals(null, null);
|
||||
//$object->recalculateJournals(null, null);
|
||||
}
|
||||
|
||||
public static function recalculateForJournal(TransactionJournal $transactionJournal): void
|
||||
@ -54,7 +54,7 @@ class AccountBalanceCalculator
|
||||
$object = new self;
|
||||
foreach ($transactionJournal->transactions as $transaction) {
|
||||
$object->recalculateLatest($transaction->account);
|
||||
$object->recalculateJournals($transaction->account, $transactionJournal);
|
||||
//$object->recalculateJournals($transaction->account, $transactionJournal);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user