From cf24e678a8662c4ff2f02c2a84a4d61ae0c0612b Mon Sep 17 00:00:00 2001 From: denisdulici Date: Tue, 28 Jan 2020 00:51:29 +0300 Subject: [PATCH] formatting --- app/Abstracts/Report.php | 4 ++++ app/Reports/ProfitLoss.php | 2 -- app/Reports/TaxSummary.php | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index 7bd688442..9defe05bb 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -139,6 +139,10 @@ abstract class Report { $chart = new Chartjs(); + if (empty($this->model->settings->chart)) { + return $chart; + } + $config = $this->chart[$this->model->settings->chart]; $default_options = $this->getLineChartOptions(); diff --git a/app/Reports/ProfitLoss.php b/app/Reports/ProfitLoss.php index 6fefe2dd3..45f6491a8 100644 --- a/app/Reports/ProfitLoss.php +++ b/app/Reports/ProfitLoss.php @@ -16,8 +16,6 @@ class ProfitLoss extends Report public $icon = 'fa fa-heart'; - public $chart = false; - public function setViews() { parent::setViews(); diff --git a/app/Reports/TaxSummary.php b/app/Reports/TaxSummary.php index e282b1ad8..af5c660e3 100644 --- a/app/Reports/TaxSummary.php +++ b/app/Reports/TaxSummary.php @@ -21,8 +21,6 @@ class TaxSummary extends Report public $icon = 'fa fa-percent'; - public $chart = false; - public function setViews() { parent::setViews();