Merge branch 'ent-13374-resultado-de-item-modules-historical-data-columnas-de-datos-desplazadas' into 'develop'

Ent-13374-resultado-de-item-modules-historical-data-columnas-de-datos-desplazadas

See merge request artica/pandorafms!7185
This commit is contained in:
Jose Martin 2024-04-12 10:48:50 +00:00
commit ee857a9e5f
1 changed files with 41 additions and 2 deletions

View File

@ -4044,6 +4044,10 @@ function reporting_html_historical_data($table, $item, $pdf=0)
__('Date'),
__('Data'),
];
$table1->headStyle['Date'] = 'text-align: center;';
$table1->headStyle['Data'] = 'text-align: center;';
$table1->data = [];
foreach ($item['data'] as $data) {
if (!is_numeric($data[__('Data')])) {
@ -4098,6 +4102,13 @@ function reporting_html_historical_data($table, $item, $pdf=0)
$table1->titleclass = 'title_table_pdf';
$table1->titlestyle = 'text-align:left;';
// Center every row
foreach ($table1->data[0] as $k => $v) {
for ($i = 0; $i < count($table1->data); $i++){
$table1->cellstyle[$i][$k] = 'text-align: center;';
}
}
return html_print_table($table1, true);
}
@ -4129,6 +4140,10 @@ function reporting_html_database_serialized($table, $item, $pdf=0)
__('Date'),
__('Data'),
];
$table1->headStyle['Date'] = 'text-align: center;';
$table1->headStyle['Data'] = 'text-align: center;';
if (!empty($item['keys'])) {
$table1->head = array_merge($table1->head, $item['keys']);
}
@ -4169,6 +4184,14 @@ function reporting_html_database_serialized($table, $item, $pdf=0)
$table1->title = $item['title'];
$table1->titleclass = 'title_table_pdf';
$table1->titlestyle = 'text-align:left;';
// Center every row
foreach ($table1->data[0] as $k => $v) {
for ($i = 0; $i < count($table1->data); $i++){
$table1->cellstyle[$i][$k] = 'text-align: center;';
}
}
return html_print_table(
$table1,
true
@ -4195,9 +4218,7 @@ function reporting_html_last_value($table, $item, $pdf=0)
$table_data->width = '100%';
$table_data->class = 'info_table';
$table_data->headstyle = [];
$table_data->headstyle[0] = 'text-align: left;';
$table_data->style = [];
$table_data->style[0] = 'text-align: left;';
$table_data->head = [
__('Name'),
__('Date'),
@ -4205,6 +4226,11 @@ function reporting_html_last_value($table, $item, $pdf=0)
__('Status'),
];
$table_data->headStyle['Name'] = 'text-align: center;';
$table_data->headStyle['Date'] = 'text-align: center;';
$table_data->headStyle['Data'] = 'text-align: center;';
$table_data->headStyle['Status'] = 'text-align: center;';
$table_data->data = [];
$table_data->data[1][0] = $item['data']['agent_name'];
$table_data->data[1][0] .= ' / ';
@ -4329,6 +4355,11 @@ function reporting_html_last_value($table, $item, $pdf=0)
true
);
} else {
// Center every row
for ($i = 0; $i < 4; $i++) {
$table_data->cellstyle['1'][$i] = 'text-align: center;';
}
return html_print_table(
$table_data,
true
@ -6398,6 +6429,14 @@ function reporting_html_sql($table, $item, $pdf=0)
$table2->title = $item['title'];
$table2->titleclass = 'title_table_pdf';
$table2->titlestyle = 'text-align:left;';
// Center every row
foreach ($table2->data[0] as $k => $v) {
for ($i = 0; $i < count($table2->data); $i++){
$table2->cellstyle[$i][$k] = 'text-align: center;';
}
}
$return_pdf .= html_print_table(
$table2,
true