akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@@ -9,13 +9,13 @@ class ExpensesByCategory extends Widget
{
public $default_name = 'widgets.expenses_by_category';
public $default_settings = [
'width' => 'col-md-6',
];
public $description = 'widgets.description.expenses_by_category';
public $report_class = 'App\Reports\ExpenseSummary';
public function show()
{
Category::with('expense_transactions')->expense()->each(function ($category) {
Category::withSubCategory()->with('expense_transactions')->expense()->each(function ($category) {
$amount = 0;
$this->applyFilters($category->expense_transactions)->each(function ($transaction) use (&$amount) {
@@ -25,7 +25,7 @@ class ExpensesByCategory extends Widget
$this->addMoneyToDonut($category->color, $amount, $category->name);
});
$chart = $this->getDonutChart(trans_choice('general.expenses', 2), 0, 160, 6);
$chart = $this->getDonutChart(trans_choice('general.expenses', 2), '100%', 300, 6);
return $this->view('widgets.donut_chart', [
'chart' => $chart,