Fixed the overview chart for categories, so it will properly reflect income and expenses. See bug #99

This commit is contained in:
James Cole
2015-07-31 14:26:22 +02:00
parent 96ddbe7227
commit ab22d2cbaa
4 changed files with 17 additions and 4 deletions

View File

@@ -198,7 +198,7 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
*/
public function spentOnDaySumCorrected(Category $category, Carbon $date)
{
return $category->transactionjournals()->onDate($date)->get(['transaction_journals.*'])->sum('amount');
return $category->transactionjournals()->onDate($date)->get(['transaction_journals.*'])->sum('correct_amount');
}
/**