From 3952cfefdec389d16098cc4ceb43969757a88474 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= <felix.suarez@pandorafms.com>
Date: Mon, 8 Apr 2024 23:47:19 -0600
Subject: [PATCH] Changes to center report

---
 pandora_console/include/functions_html.php           | 4 ++++
 pandora_console/include/functions_reporting_html.php | 1 +
 2 files changed, 5 insertions(+)

diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php
index 52ed76bd6b..2f32c9683d 100644
--- a/pandora_console/include/functions_html.php
+++ b/pandora_console/include/functions_html.php
@@ -4132,6 +4132,10 @@ function html_print_table(&$table, $return=false)
             } else {
                 $headStyle = '';
             }
+            
+            if (isset($table->headStyle[$heading])) {
+                $headStyle = ' style = "'.$table->headStyle[$heading].'" ';
+            }
 
             $output .= '<th class="'.$table->headclass[$key].'" '.$headColspan.$headStyle.' scope="col">'.$heading.'</th>';
         }
diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php
index 321cb77f69..846d009f35 100644
--- a/pandora_console/include/functions_reporting_html.php
+++ b/pandora_console/include/functions_reporting_html.php
@@ -6380,6 +6380,7 @@ function reporting_html_sql($table, $item, $pdf=0)
                 // Print the header.
                 foreach ($row as $key => $value) {
                     $table2->head[] = $key;
+                    $table2->headStyle[$key] = 'text-align: center;';
                 }
             }