[freeside-commits] freeside/httemplate/graph cust_bill_pkg.cgi, 1.1, 1.2 cust_bill_pkg-graph.cgi, 1.1, NONE

Ivan,,, ivan at wavetail.420.am
Mon May 8 03:01:56 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/graph
In directory wavetail:/tmp/cvs-serv11969/httemplate/graph

Modified Files:
	cust_bill_pkg.cgi 
Removed Files:
	cust_bill_pkg-graph.cgi 
Log Message:
sales report per agent and package class looks good

Index: cust_bill_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/graph/cust_bill_pkg.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cust_bill_pkg.cgi	7 May 2006 20:27:21 -0000	1.1
+++ cust_bill_pkg.cgi	8 May 2006 10:01:54 -0000	1.2
@@ -36,17 +36,22 @@
 }
 
 my $hue = 0;
-my $hue_increment = 145;
+#my $hue_increment = 170;
+#my $hue_increment = 145;
+my $hue_increment = 125;
 
-my @items = ();
+my @items  = ();
 my @params = ();
 my @labels = ();
 my @colors = ();
+my @links  = ();
+
+my $link = "${p}search/cust_bill_pkg.cgi?nottax=1;include_comp_cust=1";
 
 foreach my $agent ( $sel_agent || qsearch('agent', { 'disabled' => '' } ) ) {
 
   my $col_scheme = Color::Scheme->new
-                     ->from_hue($hue)
+                     ->from_hue($hue) #->from_hex($agent->color)
                      ->scheme('analogic')
                    ;
   my @recur_colors = ();
@@ -67,9 +72,13 @@
           : ''
       );
 
-    # push some params
-    push @params,
-      [ 'classnum' => ( ref($pkg_class) ? $pkg_class->classnum : '' ) ];
+    my $row_classnum = ref($pkg_class) ? $pkg_class->classnum : 0;
+    my $row_agentnum = $agent->agentnum;
+    push @params, [ 'classnum' => $row_classnum,
+                    'agentnum' => $row_agentnum,
+                  ];
+
+    push @links, "$link;agentnum=$row_agentnum;classnum=$row_classnum;";
 
     @recur_colors = ($col_scheme->colors)[0,4,8,1,5,9]
       unless @recur_colors;
@@ -83,18 +92,21 @@
 
 }
 
-use Data::Dumper;
-warn Dumper(\@items);
+#use Data::Dumper;
+#warn Dumper(\@items);
 
 %><%= include('elements/monthly.html',
-                'title'        => $title. 'Sales Report',
+                'title'        => $title. 'Sales Report (Gross)',
                 'graph_type'   => 'Mountain',
                 'items'        => \@items,
                 'params'       => \@params,
                 'labels'       => \@labels,
                 'graph_labels' => \@labels,
                 'colors'       => \@colors,
-                #'links'        => \%link,
+                'links'        => \@links,
+                'remove_empty' => 1,
+                'bottom_total' => 1,
+                'bottom_link'  => "$link;",
                 'start_month'  => $smonth,
                 'start_year'   => $syear,
                 'end_month'    => $emonth,

--- cust_bill_pkg-graph.cgi DELETED ---



More information about the freeside-commits mailing list