fixed sub category issues

This commit is contained in:
Denis Duliçi
2022-07-21 11:46:18 +03:00
parent e5a68d8450
commit b93a5fcd49
10 changed files with 149 additions and 121 deletions

View File

@ -15,7 +15,7 @@ class ExpensesByCategory extends Widget
public function show()
{
Category::withSubCategory()->with('expense_transactions')->expense()->each(function ($category) {
Category::with('expense_transactions')->expense()->each(function ($category) {
$amount = 0;
$this->applyFilters($category->expense_transactions)->each(function ($transaction) use (&$amount) {
@ -29,7 +29,7 @@ class ExpensesByCategory extends Widget
$chart->options['legend']['width'] = 160;
$chart->options['legend']['position'] = 'right';
return $this->view('widgets.donut_chart', [
'chart' => $chart,
]);