close #1053 Added: Dashboard date filter

This commit is contained in:
Cüneyt Şentürk
2019-12-30 12:30:30 +03:00
parent 237b161fe0
commit bd0598b4d4
14 changed files with 152 additions and 56 deletions

View File

@@ -16,7 +16,9 @@ class ExpensesByCategory extends Widget
Category::with('expense_transactions')->type('expense')->enabled()->each(function ($category) {
$amount = 0;
foreach ($category->expense_transactions as $transacion) {
$transactions = $this->applyFilters($category->expense_transactions())->get();
foreach ($transactions as $transacion) {
$amount += $transacion->getAmountConvertedToDefault();
}