Fixed some bugs that caused inconsistencies in the monthly reports.

This commit is contained in:
James Cole
2015-08-29 07:20:53 +02:00
parent e5b88be5fa
commit c3958ed3c4
4 changed files with 6 additions and 16 deletions

View File

@@ -350,7 +350,7 @@ class ReportHelper implements ReportHelperInterface
$object = new Expense;
$set = $this->query->expenseInPeriodCorrected($start, $end, $shared);
foreach ($set as $entry) {
$object->addToTotal($entry->amount);
$object->addToTotal($entry->actual_amount);
$object->addOrCreateExpense($entry);
}
@@ -371,7 +371,7 @@ class ReportHelper implements ReportHelperInterface
$object = new Income;
$set = $this->query->incomeInPeriodCorrected($start, $end, $shared);
foreach ($set as $entry) {
$object->addToTotal($entry->amount);
$object->addToTotal($entry->actual_amount);
$object->addOrCreateIncome($entry);
}

View File

@@ -70,15 +70,6 @@ class ReportQuery implements ReportQueryInterface
}
}
);
$data = $data->filter(
function (TransactionJournal $journal) {
if ($journal->amount != 0) {
return $journal;
}
return null;
}
);
return $data;
}