[freeside-commits] freeside/httemplate/graph/elements monthly.html, 1.9, 1.10

Mark Wells mark at wavetail.420.am
Mon Dec 26 12:24:19 PST 2011


Update of /home/cvs/cvsroot/freeside/httemplate/graph/elements
In directory wavetail.420.am:/tmp/cvs-serv14495/httemplate/graph/elements

Modified Files:
	monthly.html 
Log Message:
sales report improvements, #15393

Index: monthly.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/graph/elements/monthly.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- monthly.html	13 May 2011 20:03:20 -0000	1.9
+++ monthly.html	26 Dec 2011 20:24:17 -0000	1.10
@@ -64,6 +64,7 @@
 <%init>
 
 my(%opt) = @_;
+$opt{'debug'} ||= $cgi->param('debug');
 
 my $conf = new FS::Conf;
 my $money_char = $opt{'disable_money'} ? '' : $conf->config('money_char');
@@ -115,15 +116,27 @@
       'doublemonths' => $opt{'doublemonths'},
 );
 
+warn Dumper({ 'REPORTOPTS' => \%reportopts }) if $opt{'debug'};
+
 my $report;
 $report = new FS::Report::Table::Daily(%reportopts) if $opt{'daily'};
 $report = new FS::Report::Table::Monthly(%reportopts) unless $opt{'daily'};
 my $data = $report->data;
 
+warn Dumper({'DATA' => $data}) if $opt{'debug'};
+
 my $col_labels = [ map { my $m = $_; $m =~ s/^(\d+)\//$mon[$1-1] / ; $m }
                              @{$data->{label}} ];
 $col_labels = $data->{label} if $opt{'daily'};
 
+if ( $opt{'remove_empty'} ) {
+  # need to filter out series labels for collapsed rows
+  $opt{'graph_labels'} = [ 
+    map { $opt{'graph_labels'}[$_] } 
+    @{ $data->{indices} }
+  ];
+}
+
 my @links;
 foreach my $link (@{ $data->{'links'} }) {
   my @speriod = @{$data->{'speriod'}};



More information about the freeside-commits mailing list