diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2017-10-17 14:22:19 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2017-10-17 14:22:19 -0700 |
| commit | dfbcb60e8b9207bd9aa7ebd297ff9d2599121bf5 (patch) | |
| tree | 71955c86e09289dddd636a1f54c091e2d52b3000 /httemplate/graph/cust_pkg.html | |
| parent | 929783d1045757abbe5c84ff2439547b0f8eca23 (diff) | |
| parent | 689738f7c234903160cbe23f337c11f8c0621f00 (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/graph/cust_pkg.html')
| -rw-r--r-- | httemplate/graph/cust_pkg.html | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/httemplate/graph/cust_pkg.html b/httemplate/graph/cust_pkg.html index 3b6552ba8..68c5b2136 100644 --- a/httemplate/graph/cust_pkg.html +++ b/httemplate/graph/cust_pkg.html @@ -7,12 +7,13 @@ 'links' => \@links, 'params' => \@params, 'agentnum' => $agentnum, - 'sprintf' => ( $normalize ? '%0.1f%%' : '%u'), + 'sprintf' => ( $normalize ? '%0.1f%%' : '%u'), + 'sprintf_fields' => $sprintf_fields, 'normalize' => ( $normalize ? 0 : undef ), 'disable_money' => 1, 'remove_empty' => (scalar(@group_keys) > 1 ? 1 : 0), 'nototal' => 1, - 'no_graph' => [ 1, 0, 0, 0, 0 ], # don't graph 'active' + 'no_graph' => [ 1, 0, 0, 0, 0, 1 ], # don't graph 'active, total_revenue' &> <%init> @@ -33,7 +34,7 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { my $agentname = $agent ? $agent->agent.' ' : ''; -my @base_items = qw( active_pkg setup_pkg susp_pkg unsusp_pkg cancel_pkg ); +my @base_items = qw( active_pkg setup_pkg susp_pkg unsusp_pkg cancel_pkg total_revenue_pkg ); my %base_labels = ( 'active_pkg' => 'Active packages', @@ -41,6 +42,7 @@ my %base_labels = ( 'susp_pkg' => 'Suspensions', 'unsusp_pkg' => 'Unsuspensions', 'cancel_pkg' => 'Cancellations', + 'total_revenue_pkg' => 'Total Revenue' ); my %base_colors = ( @@ -49,8 +51,13 @@ my %base_colors = ( 'susp_pkg' => 'ff9900', #yellow 'unsusp_pkg' => '44ff44', #light green 'cancel_pkg' => 'cc0000', #red + 'total_revenue_pkg' => '0000ff', #blue ); +my $sprintf_fields = { + 'total_revenue_pkg' => '%.2f', #format to 2 decimal places +}; + my %base_links; foreach my $status (qw(active setup cancel susp unsusp)) { $base_links{$status.'_pkg'} = |
