X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FReportGenerator.pm;h=b90b65529f36f84f9946245a19fd8de9746cfbb5;hb=f8529382599e678ff266bd26ab82782e3d7b2686;hp=6c61acbc0a992acf4564aac7dfc0f2eb25d10160;hpb=76c486e3bf157e844b0cf11828d55dae2cb7e439;p=kivitendo-erp.git diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index 6c61acbc0..b90b65529 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -1,7 +1,6 @@ package SL::ReportGenerator; -#use strict; - +use Data::Dumper; use Encode; use IO::Wrap; use List::Util qw(max); @@ -338,7 +337,7 @@ sub prepare_html_content { next; } - my $col = $row->{$col_name}; + my $col = $row->{$col_name} || { data => [] }; $col->{CELL_ROWS} = [ ]; foreach my $i (0 .. scalar(@{ $col->{data} }) - 1) { push @{ $col->{CELL_ROWS} }, { @@ -762,7 +761,7 @@ sub generate_csv_content { next; } - my $num_output = ($col->{colspan} && ($col->{colspan} > 1)) ? $col->{colspan} : 1; + my $num_output = ($row->{$col}{colspan} && ($row->{$col}->{colspan} > 1)) ? $row->{$col}->{colspan} : 1; $skip_next = $num_output - 1; push @data, join($eol, map { s/\r?\n/$eol/g; $_ } @{ $row->{$col}->{data} });