summaryrefslogtreecommitdiff
path: root/httemplate/graph/elements
diff options
context:
space:
mode:
authormark <mark>2011-12-26 20:24:17 +0000
committermark <mark>2011-12-26 20:24:17 +0000
commitaec23d6f04cffd44e3137efc6aa212825baf46a5 (patch)
tree2022ef5ec4a664b68f99b50dae5922c843d2e22e /httemplate/graph/elements
parentf1439110b2012fff10b54a88b54e25e57365ff50 (diff)
sales report improvements, #15393
Diffstat (limited to 'httemplate/graph/elements')
-rw-r--r--httemplate/graph/elements/monthly.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/httemplate/graph/elements/monthly.html b/httemplate/graph/elements/monthly.html
index a451ea8ff..99db31ecf 100644
--- a/httemplate/graph/elements/monthly.html
+++ b/httemplate/graph/elements/monthly.html
@@ -64,6 +64,7 @@ Example:
<%init>
my(%opt) = @_;
+$opt{'debug'} ||= $cgi->param('debug');
my $conf = new FS::Conf;
my $money_char = $opt{'disable_money'} ? '' : $conf->config('money_char');
@@ -115,15 +116,27 @@ my %reportopts = (
'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'}};