<%init>
my(%opt) = @_;
+$opt{'debug'} ||= $cgi->param('debug');
my $conf = new FS::Conf;
my $money_char = $opt{'disable_money'} ? '' : $conf->config('money_char');
'doublemonths' => $opt{'doublemonths'},
);
+warn Dumper({ 'REPORTOPTS' => \%reportopts }) if $opt{'debug'};
+
my $report;
$report = new FS::Report::Table::Daily(%reportopts) if $opt{'daily'};
$report = new FS::Report::Table::Monthly(%reportopts) unless $opt{'daily'};
my $data = $report->data;
+warn Dumper({'DATA' => $data}) if $opt{'debug'};
+
my $col_labels = [ map { my $m = $_; $m =~ s/^(\d+)\//$mon[$1-1] / ; $m }
@{$data->{label}} ];
$col_labels = $data->{label} if $opt{'daily'};
+if ( $opt{'remove_empty'} ) {
+ # need to filter out series labels for collapsed rows
+ $opt{'graph_labels'} = [
+ map { $opt{'graph_labels'}[$_] }
+ @{ $data->{indices} }
+ ];
+}
+
my @links;
foreach my $link (@{ $data->{'links'} }) {
my @speriod = @{$data->{'speriod'}};