diff options
author | Mark Wells <mark@freeside.biz> | 2014-09-18 13:45:57 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2014-09-18 13:45:57 -0700 |
commit | e58351f6f09eb25ab48d0567b31a2eea25188de0 (patch) | |
tree | e8b67eb30fed32f19e7697d615207585f5b37f8f /httemplate | |
parent | 3c036f878548a8aab8ff88911a7b238e20d68bbe (diff) |
ARPU option on sales report, #30911
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/graph/cust_bill_pkg.cgi | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/httemplate/graph/cust_bill_pkg.cgi b/httemplate/graph/cust_bill_pkg.cgi index 151b29504..ea7fee932 100644 --- a/httemplate/graph/cust_bill_pkg.cgi +++ b/httemplate/graph/cust_bill_pkg.cgi @@ -1,7 +1,7 @@ <% include('elements/monthly.html', #Dumper( 'title' => $title, - 'graph_type' => 'Mountain', + 'graph_type' => $graph_type, 'items' => \@items, 'params' => \@params, 'labels' => \@labels, @@ -10,7 +10,8 @@ 'links' => \@links, 'no_graph' => \@no_graph, 'remove_empty' => 1, - 'bottom_total' => 1, + 'bottom_total' => $show_total, + 'nototal' => !$show_total, 'bottom_link' => $bottom_link, 'agentnum' => $agentnum, 'cust_classnum'=> \@cust_classnums, @@ -30,6 +31,15 @@ my $use_override = $cgi->param('use_override') ? 1 : 0; my $average_per_cust_pkg = $cgi->param('average_per_cust_pkg') ? 1 : 0; my $distribute = $cgi->param('distribute') ? 1 : 0; +my $show_total = 1; +my $graph_type = 'Mountain'; + +if ( $average_per_cust_pkg ) { + # then the rows are not additive + $show_total = 0; + $graph_type = 'LinesPoints'; +} + my %charge_labels = ( 'SR' => 'setup + recurring', 'RU' => 'recurring', @@ -356,6 +366,17 @@ foreach my $agent ( $all_agent || $sel_agent || $FS::CurrentUser::CurrentUser->a } +# may be useful at some point... +#if ( $average_per_cust_pkg ) { +# @items = map { ('cust_bill_pkg', 'cust_bill_pkg_count_pkgnum') } @items; +# @labels = map { $_, "Packages" } @labels; +# @params = map { $_, $_ } @params; +# @links = map { $_, $_ } @links; +# @colors = map { $_, $_ } @colors; +# @no_graph = map { $_, 1 } @no_graph; +#} +# + #use Data::Dumper; if ( $cgi->param('debug') == 1 ) { $FS::Report::Table::DEBUG = 1; |