Bugfixes Report

x
This commit is contained in:
Xenomporio 2022-05-23 22:47:19 +02:00
parent 8fe43e827a
commit eba98fd51d
2 changed files with 8 additions and 2 deletions

View File

@ -170,7 +170,7 @@ final class Bootstrap
*
* @return ReportColumnFormatter
*/
public function onInitReportColumnFormatter(ContainerInterface $container): ReportColumnFormatter
public static function onInitReportColumnFormatter(ContainerInterface $container): ReportColumnFormatter
{
return new ReportColumnFormatter();
}

View File

@ -88,10 +88,16 @@ class ReportPdfExportService extends AbstractReportExportService
$prepareHeaderLine = false;
}
if (gettype($columnKey != 'int'))
{
$columnKey = 0;
}
$keyint = $columnKey + 1;
$columnCounter = 0;
foreach($row as $columnKey=>$columnValue){
$pdf->Cell($colWidths[$columnCounter],6,$this->stringReadyForPdf($columnValue),'LRTB',0,$colAligns[$columnCounter],true);
if(!empty($sumcolsa) && in_array($columnKey+1,$sumcolsa, false))
if(!empty($sumcolsa) && in_array($keyint,$sumcolsa, false))
{
if(empty($sums[$columnKey])){
$sums[$columnKey] = 0;