-<%
-
-
-#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 ) = ('', '');
}
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*)$/ ) {
push @pkg_class, '(empty class)';
}
}
+#eslaf
my $hue = 0;
#my $hue_increment = 170;
#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,
- )
-%>
+</%init>