Small but expensive changes to audit report.

This commit is contained in:
James Cole 2016-05-17 16:10:32 +02:00
parent 4cbb0d9716
commit 109d96ad16
2 changed files with 3 additions and 2 deletions

View File

@ -177,11 +177,11 @@ class ReportController extends Controller
/** @var TransactionJournal $journal */
foreach ($journals as $journal) {
$journal->before = $startBalance;
$transactionAmount = $journal->source_amount;
$transactionAmount = TransactionJournal::amount($journal);
// get currently relevant transaction:
if (intval($journal->destination_account_id) === $account->id) {
$transactionAmount = $journal->destination_amount;
$transactionAmount = TransactionJournal::amountPositive($journal);
}
$newBalance = bcadd($startBalance, $transactionAmount);
$journal->after = $newBalance;

View File

@ -656,6 +656,7 @@ return [
'report_audit' => 'Transaction history overview for :start until :end',
'quick_link_reports' => 'Quick links',
'quick_link_default_report' => 'Default financial report',
'quick_link_audit_report' => 'Transaction history overview',
'report_this_month_quick' => 'Current month, all accounts',
'report_this_year_quick' => 'Current year, all accounts',
'report_this_fiscal_year_quick' => 'Current fiscal year, all accounts',