Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / graph / elements / monthly.html
index c736de6..4b988f1 100644 (file)
@@ -37,6 +37,7 @@ Example:
     #optional
     'agentnum'        => $agentnum,
     'refnum'          => $refnum,
+    'cust_classnum'   => \@classnums,
     'nototal'         => 1,
     'graph_type'      => 'LinesPoints',
     'remove_empty'    => 1,
@@ -121,8 +122,10 @@ my %reportopts = (
       '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'};
@@ -145,17 +148,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;