summaryrefslogtreecommitdiff
path: root/httemplate/graph/money_time-graph.cgi
diff options
context:
space:
mode:
authorivan <ivan>2006-05-02 11:59:31 +0000
committerivan <ivan>2006-05-02 11:59:31 +0000
commitf29c752d6f9e813c10295b334eefb924216e34cf (patch)
tree4497153bb67d7acf7fe8ca845f87c110061d9a92 /httemplate/graph/money_time-graph.cgi
parentaa9fd844aeeb385cfc1e934eb7b7a08b1353a4ea (diff)
add a "pre-report" page to this report/graph as requested by lewis/wtxs, also add 12mo total option
Diffstat (limited to 'httemplate/graph/money_time-graph.cgi')
-rwxr-xr-xhttemplate/graph/money_time-graph.cgi9
1 files changed, 9 insertions, 0 deletions
diff --git a/httemplate/graph/money_time-graph.cgi b/httemplate/graph/money_time-graph.cgi
index fc8207a81..637a3bf94 100755
--- a/httemplate/graph/money_time-graph.cgi
+++ b/httemplate/graph/money_time-graph.cgi
@@ -22,6 +22,10 @@ if ( $cgi->param('agentnum') =~ /^(\d*)$/ ) {
#my %data;
my @items = qw( invoiced netsales credits payments receipts );
+if ( $cgi->param('12mo') == 1 ) {
+ @items = map $_.'_12mo', @items;
+}
+
my %label = (
'invoiced' => 'Gross Sales (invoiced)',
'netsales' => 'Net Sales (invoiced - applied credits)',
@@ -29,6 +33,9 @@ my %label = (
'payments' => 'Gross Receipts (payments)',
'receipts' => 'Net Receipts/Cashflow (payments - refunds)',
);
+$label{$_.'_12mo'} = $label{$_}. " (previous 12 months)"
+ foreach keys %label;
+
my %color = (
'invoiced' => [ 153, 153, 255 ], #light blue
'netsales' => [ 0, 0, 204 ], #blue
@@ -36,6 +43,8 @@ my %color = (
'payments' => [ 153, 204, 153 ], #light green
'receipts' => [ 0, 204, 0 ], #green
);
+$color{$_.'_12mo'} = $color{$_}
+ foreach keys %color;
my $report = new FS::Report::Table::Monthly (
'items' => \@items,