summaryrefslogtreecommitdiff
path: root/httemplate/search/report_cust_payby.html
blob: 81a827051c17c492b02922bfd947947de574c913 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<& /elements/header.html, mt('Customer stored payment infomation report') &>

<FORM ACTION="cust_payby.html" METHOD="GET">

  <TABLE BGCOLOR="#cccccc" CELLSPACING=0>

    <& /elements/tr-select-payby.html,
                  'payby_type'   => 'cust',
                  'multiple'     => 1,
                  'all_selected' => 1,
    &>

    <TR>
      <TD ALIGN="right"><% mt('Payment expiration before') |h %></TD>
      <TD>
        <SELECT NAME="paydate_month" DISABLED>
%         foreach my $month ( 1 .. 12 ) {
            <OPTION VALUE="<% $month %>"><% $month %></OPTION>
%         }
        </SELECT>
        /
        <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
          <OPTION VALUE=""></OPTION>
%         my $lastyear = (localtime(time))[5] + 1899;
%         foreach my $year ( $lastyear .. $lastyear+12 ) {
            <OPTION VALUE="<% $year %>"><% $year %></OPTION>
%         }
        </SELECT>
      </TD>
    </TR>

    <SCRIPT TYPE="text/javascript">
      function paydate_year_changed(what) {
        var value = what.options[what.selectedIndex].value;
        var month_select = what.form.paydate_month;
        if ( value == '' ) {
          month_select.disabled = true;
        } else {
          month_select.disabled = false;
        }
      }
    </SCRIPT>

 </TABLE>

<BR>
<INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">

</FORM>

<& /elements/footer.html &>
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Advanced customer search');

</%init>