diff --git a/app/Ninja/Reports/AbstractReport.php b/app/Ninja/Reports/AbstractReport.php index e327c60b7170..511872be178e 100644 --- a/app/Ninja/Reports/AbstractReport.php +++ b/app/Ninja/Reports/AbstractReport.php @@ -14,6 +14,7 @@ class AbstractReport public $totals = []; public $columns = []; public $data = []; + public $columns_labeled = []; public function __construct($startDate, $endDate, $isExport, $options = false) { @@ -52,9 +53,7 @@ class AbstractReport $this->totals[$currencyId][$dimension][$field] += $value; } - public function tableHeader() - { - $str = ''; + public function tableHeaderArray() { foreach ($this->columns as $key => $val) { if (is_array($val)) { @@ -75,8 +74,18 @@ class AbstractReport $class = count($class) ? implode(' ', $class) : 'group-false'; $label = trans("texts.{$field}"); - $str .= "
- @endif + @if (count(array_values($reportTotals))) + +
+ @endif - - + -