first pass at sales reports per agent and package class
[freeside.git] / httemplate / elements / tr-select-from_to.html
1 <%
2
3   #my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
4   my ($curmon,$curyear) = (localtime(time))[4,5];
5   
6   #find first month
7   my $syear = 1899+$curyear;
8   my $smonth = $curmon+1;
9   
10   #want 12 month by default, not 13
11   $smonth++;
12   if ( $smonth > 12 ) { $smonth-=12; $syear++ }
13   
14   #find last month
15   my $eyear = 1900+$curyear;
16   my $emonth = $curmon+1;
17
18   my %hash = (
19     'show_month_abbr' => 1,
20     'start_year'      => '1999',
21     'end_year'        => '2012', #haha, well...
22      @_,
23   );
24
25 %>
26
27 <TR>
28   <TD ALIGN="right">From: </TD>
29   <TD>
30     <%= include('/elements/select-month_year.html',
31                   'prefix'        => 'start',
32                   'selected_mon'  => $smonth,
33                   'selected_year' => $syear,
34                   %hash,
35                )
36     %>
37   </TD>
38 </TR>
39
40 <TR>
41   <TD ALIGN="right">To: </TD>
42   <TD>
43     <%= include('/elements/select-month_year.html',
44                   'prefix'        => 'end',
45                   'selected_mon'  => $emonth,
46                   'selected_year' => $eyear,
47                   %hash,
48                )
49     %>
50   </TD>
51 </TR>