[freeside-commits] freeside/httemplate/graph cust_bill_pkg.cgi, 1.6, 1.7
Ivan,,,
ivan at wavetail.420.am
Mon May 25 15:42:23 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/graph
In directory wavetail.420.am:/tmp/cvs-serv25038/graph
Modified Files:
cust_bill_pkg.cgi
Log Message:
fix total links on sales graph when a package class is specified, RT#5449
Index: cust_bill_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/graph/cust_bill_pkg.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cust_bill_pkg.cgi 14 Aug 2007 21:46:17 -0000 1.6
+++ cust_bill_pkg.cgi 25 May 2009 22:42:21 -0000 1.7
@@ -9,7 +9,7 @@
'links' => \@links,
'remove_empty' => 1,
'bottom_total' => 1,
- 'bottom_link' => "$link;",
+ 'bottom_link' => $bottom_link,
'agentnum' => $agentnum,
)
%>
@@ -27,21 +27,42 @@
}
my $title = $sel_agent ? $sel_agent->agent.' ' : '';
-#false lazinessish w/search/cust_pkg.cgi
+my $link = "${p}search/cust_bill_pkg.cgi?nottax=1;include_comp_cust=1";
+my $bottom_link = "$link;";
+
+#classnum (here)
+# 0: all classes
+# not specified: empty class
+# N: classnum
+#classnum (link)
+# not specified: all classes
+# 0: empty class
+# N: classnum
+
+#false lazinessish w/FS::cust_pkg::search_sql (previously search/cust_pkg.cgi)
my $classnum = 0;
my @pkg_class = ();
if ( $cgi->param('classnum') =~ /^(\d*)$/ ) {
$classnum = $1;
- if ( $classnum ) {
+
+ if ( $classnum ) { #a specific class
+
@pkg_class = ( qsearchs('pkg_class', { 'classnum' => $classnum } ) );
die "classnum $classnum not found!" unless $pkg_class[0];
$title .= $pkg_class[0]->classname.' ';
- } elsif ( $classnum eq '' ) {
+ $bottom_link .= "classnum=$classnum;";
+
+ } elsif ( $classnum eq '' ) { #the empty class
+
$title .= 'Empty class ';
@pkg_class = ( '(empty class)' );
- } elsif ( $classnum eq '0' ) {
+ $bottom_link .= "classnum=0;";
+
+ } elsif ( $classnum eq '0' ) { #all classes
+
@pkg_class = qsearch('pkg_class', {} ); # { 'disabled' => '' } );
push @pkg_class, '(empty class)';
+
}
}
#eslaf
@@ -57,8 +78,6 @@
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
More information about the freeside-commits
mailing list