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