RT# 82137 - default payment amount now has processing fee in total if processing...
[freeside.git] / httemplate / elements / tr-select-from_to.html
1 <TR>
2   <TD ALIGN="right"><% mt('From: ') |h %></TD>
3   <TD>
4     <& /elements/select-month_year.html,
5                   'prefix'        => 'start',
6                   'selected_mon'  => $smonth,
7                   'selected_year' => $syear,
8                   %hash,
9     &>
10   </TD>
11 </TR>
12
13 <TR>
14   <TD ALIGN="right"><% mt('To: ') |h %></TD>
15   <TD>
16     <& /elements/select-month_year.html,
17                   'prefix'        => 'end',
18                   'selected_mon'  => $emonth,
19                   'selected_year' => $eyear,
20                   %hash,
21     &>
22   </TD>
23 </TR>
24 <%init>
25   my ($curmon,$curyear) = (localtime(time))[4,5];
26   
27   #find first month
28   my $syear = 1899+$curyear;
29   my $smonth = $curmon+1;
30   
31   #want 12 month by default, not 13
32   $smonth++;
33   if ( $smonth > 12 ) { $smonth-=12; $syear++ }
34   
35   #find last month
36   my $eyear = 1900+$curyear;
37   my $emonth = $curmon+1;
38
39   my %hash = (
40     'show_month_abbr' => 1,
41     'start_year'      => '1999',
42     'end_year'        => $eyear+3,
43      @_,
44   );
45 </%init>