X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fgraph%2Felements%2Fmonthly.html;h=1a9428115832aa8f97ba63efa52700b90b6ead2b;hb=ff27c3f36240aee48ed50153dd5d8fe3ac3f2443;hp=939f18a3549487f3f91728216a49d0021043d0b4;hpb=7a618d4493ab7a87f6eabfd1ce3630a6b3436c2f;p=freeside.git diff --git a/httemplate/graph/elements/monthly.html b/httemplate/graph/elements/monthly.html index 939f18a35..1a9428115 100644 --- a/httemplate/graph/elements/monthly.html +++ b/httemplate/graph/elements/monthly.html @@ -27,7 +27,7 @@ Example: 'start_year' => $syear, 'end_month' => $emonth, 'end_year' => $eyear, - + '12mo' => 0, #optional, pulled from CGI params if not specified, #only if 'daily' option is given @@ -96,6 +96,8 @@ $opt{'start_year'} ||= $cgi->param('start_year'); # || 1899+$curyear; $opt{'end_month'} ||= $cgi->param('end_month'); # || $curmon+1; $opt{'end_year'} ||= $cgi->param('end_year'); # || 1900+$curyear; +$opt{'12mo'} ||= $cgi->param('12mo') ? 1 : 0; + $opt{'projection'} ||= $cgi->param('projection') ? 1 : 0; if ( $opt{'daily'} ) { # daily granularity @@ -119,12 +121,14 @@ my %reportopts = ( 'end_day' => $opt{'end_day'}, 'end_month' => $opt{'end_month'}, 'end_year' => $opt{'end_year'}, + '12mo' => $opt{'12mo'}, 'projection' => $opt{'projection'}, 'agentnum' => $opt{'agentnum'}, 'refnum' => $opt{'refnum'}, 'cust_classnum'=> $opt{'cust_classnum'}, 'remove_empty' => $opt{'remove_empty'}, 'doublemonths' => $opt{'doublemonths'}, + 'normalize' => $opt{'normalize'}, ); warn Dumper({ 'REPORTOPTS' => \%reportopts }) if $opt{'debug'}; @@ -147,17 +151,12 @@ $col_labels = $data->{label} if $opt{'daily'}; my @colors; my @graph_labels; my @no_graph; -if ( $opt{'remove_empty'} ) { +#if ( $opt{'remove_empty'} ) { # no, always do this # then filter out per-item things for collapsed rows - foreach my $i (@{ $data->{'indices'} }) { - push @colors, $opt{'colors'}[$i]; - push @graph_labels, $opt{'graph_labels'}[$i]; - push @no_graph, $opt{'no_graph'}[$i]; - } -} else { - @colors = @{ $opt{'colors'} }; - @graph_labels = @{ $opt{'graph_labels'} }; - @no_graph = @{ $opt{'no_graph'} || [] }; +foreach my $i (@{ $data->{'indices'} }) { + push @colors, $opt{'colors'}[$i]; + push @graph_labels, $opt{'graph_labels'}[$i]; + push @no_graph, $opt{'no_graph'}[$i]; } my @links;