mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-17 01:42:19 +00:00
Small changes to audit report.
This commit is contained in:
@@ -177,11 +177,11 @@ class ReportController extends Controller
|
||||
/** @var TransactionJournal $journal */
|
||||
foreach ($journals as $journal) {
|
||||
$journal->before = $startBalance;
|
||||
$transactionAmount = TransactionJournal::amount($journal);
|
||||
$transactionAmount = $journal->source_amount;
|
||||
|
||||
// get currently relevant transaction:
|
||||
if (intval($journal->destination_account_id) === $account->id) {
|
||||
$transactionAmount = TransactionJournal::amountPositive($journal);
|
||||
$transactionAmount = $journal->destination_amount;
|
||||
}
|
||||
$newBalance = bcadd($startBalance, $transactionAmount);
|
||||
$journal->after = $newBalance;
|
||||
|
@@ -419,7 +419,9 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
// that should do it:
|
||||
$fields = TransactionJournal::queryFields();
|
||||
$fields[] = 'source.account_id as source_account_id';
|
||||
$fields[] = 'source.amount as source_amount';
|
||||
$fields[] = 'destination.account_id as destination_account_id';
|
||||
$fields[] = 'destination.amount as destination_amount';
|
||||
$complete = $query->get($fields);
|
||||
|
||||
return $complete;
|
||||
|
Reference in New Issue
Block a user