Merge branch 'ent-4892-HTML-custom-report-date-vacio' into 'develop'
Ent 4892 html custom report date vacio See merge request artica/pandorafms!2847
This commit is contained in:
commit
35d87400fd
|
@ -179,6 +179,10 @@ function reporting_make_reporting_data(
|
|||
$report['group_name'] = groups_get_name($report['id_group']);
|
||||
$report['contents'] = [];
|
||||
|
||||
if (empty($report['period']) && $pdf === false) {
|
||||
$report['period'] = $period;
|
||||
}
|
||||
|
||||
if (empty($contents)) {
|
||||
return reporting_check_structure_report($report);
|
||||
}
|
||||
|
|
|
@ -121,12 +121,9 @@ function html_do_report_info($report)
|
|||
</tr>
|
||||
<tr>
|
||||
<td><b>'.__('Report date').': </b></td>';
|
||||
if (isset($report['period'])) {
|
||||
if (is_numeric($report['datetime']) && is_numeric($report['period'])) {
|
||||
$html .= '<td>'.date($config['date_format'], ($report['datetime'] - $report['period'])).'</td>';
|
||||
}
|
||||
|
||||
$html .= '<td></td>';
|
||||
if (is_numeric($report['datetime']) && is_numeric($report['period']) && ($report['period'] != 0)) {
|
||||
$html .= '<td>'.__('From').' <b>'.date($config['date_format'], ($report['datetime'] - $report['period'])).'</b></td>';
|
||||
$html .= '<td>'.__('to').' <b>'.date($config['date_format'], $report['datetime']).'</b></td>';
|
||||
} else {
|
||||
$html .= '<td>'.__('Items period before').' <b>'.date($config['date_format'], $report['datetime']).'</b></td>';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue