Fixed a bug where the category list in a monthly report would be empty.

This commit is contained in:
James Cole
2015-08-02 07:04:43 +02:00
parent af7952f204
commit 4f0ed97410
10 changed files with 24 additions and 23 deletions

View File

@@ -34,7 +34,8 @@ class Category
*/
public function addCategory(CategoryModel $category)
{
if ($category->spent > 0) {
// spent is minus zero for an expense report:
if ($category->spent < 0) {
$this->categories->push($category);
}
}