X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fgraph%2Fcust_bill_pkg.cgi;h=d7cae80556624dae048efba38f024fa0582453f5;hb=ec5603ae351d4ed8e4873dcd20bf71f8a4d549bb;hp=cb8225516ea0809eef343075d0008fae4885b66b;hpb=896ef9b1a5302dc2d96d351702be94184825cc91;p=freeside.git diff --git a/httemplate/graph/cust_bill_pkg.cgi b/httemplate/graph/cust_bill_pkg.cgi index cb8225516..d7cae8055 100644 --- a/httemplate/graph/cust_bill_pkg.cgi +++ b/httemplate/graph/cust_bill_pkg.cgi @@ -1,13 +1,22 @@ -<% - - -#find first month -my $syear = $cgi->param('start_year'); # || 1899+$curyear; -my $smonth = $cgi->param('start_month'); # || $curmon+1; +<% include('elements/monthly.html', + 'title' => $title. 'Sales Report (Gross)', + 'graph_type' => 'Mountain', + 'items' => \@items, + 'params' => \@params, + 'labels' => \@labels, + 'graph_labels' => \@labels, + 'colors' => \@colors, + 'links' => \@links, + 'remove_empty' => 1, + 'bottom_total' => 1, + 'bottom_link' => "$link;", + 'agentnum' => $agentnum, + ) +%> +<%init> -#find last month -my $eyear = $cgi->param('end_year'); # || 1900+$curyear; -my $emonth = $cgi->param('end_month'); # || $curmon+1; +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); #XXX or virtual my( $agentnum, $sel_agent ) = ('', ''); @@ -18,6 +27,7 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { } my $title = $sel_agent ? $sel_agent->agent.' ' : ''; +#false lazinessish w/search/cust_pkg.cgi my $classnum = 0; my @pkg_class = (); if ( $cgi->param('classnum') =~ /^(\d*)$/ ) { @@ -34,6 +44,7 @@ if ( $cgi->param('classnum') =~ /^(\d*)$/ ) { push @pkg_class, '(empty class)'; } } +#eslaf my $hue = 0; #my $hue_increment = 170; @@ -95,22 +106,4 @@ foreach my $agent ( $sel_agent || qsearch('agent', { 'disabled' => '' } ) ) { #use Data::Dumper; #warn Dumper(\@items); -%><%= include('elements/monthly.html', - 'title' => $title. 'Sales Report (Gross)', - 'graph_type' => 'Mountain', - 'items' => \@items, - 'params' => \@params, - 'labels' => \@labels, - 'graph_labels' => \@labels, - 'colors' => \@colors, - 'links' => \@links, - 'remove_empty' => 1, - 'bottom_total' => 1, - 'bottom_link' => "$link;", - 'start_month' => $smonth, - 'start_year' => $syear, - 'end_month' => $emonth, - 'end_year' => $eyear, - 'agentnum' => $agentnum, - ) -%> +