summaryrefslogtreecommitdiff
path: root/httemplate/search/report_cust_main.html
blob: f139d4bb55347f65d11c406d8d0acfd107e6b920 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<% include('/elements/header.html', 'Customer Report' ) %>

<FORM ACTION="cust_main.html" METHOD="GET">
<INPUT TYPE="hidden" NAME="magic" VALUE="bill">

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

    <TR>
      <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
    </TR>

    <% include( '/elements/tr-select-agent.html',
                  'curr_value'    => scalar($cgi->param('agentnum')),
                  'disable_empty' => 0,
               )
    %>

    <% include( '/elements/tr-select-cust_main-status.html',
                  'label' => 'Status'
              )
    %>


%   foreach my $field (qw( signupdate )) {

      <TR>
        <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
        <TD>
          <TABLE>
            <% include( '/elements/tr-input-beginning_ending.html',
                          prefix   => $field,
                          layout   => 'horiz',
                      )
            %>
          </TABLE>
        </TD>
      </TR>

%   }

    <% include( '/elements/tr-select-payby.html',
                  'payby_type' => 'cust',
                  'multiple'   => 1,
                  'curr_value' => { map { $_ => 1 } FS::payby->cust_payby },
              )
    %>
    
    <% include( '/elements/tr-input-lessthan_greaterthan.html',
                  label   => 'Current balance',
                  field   => 'current_balance',
              )
    %>

    <TR>
      <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
        <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
    </TR>

%   if ( $conf->exists('cust_main-require_censustract') ) {

    <TR>
      <TD ALIGN="right" VALIGN="center">Without census tract</TD>
        <TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
    </TR>

%   }

    <TR>
      <TH BGCOLOR="#e8e8e8" COLSPAN=2>&nbsp;</TH>
    </TR>

    <TR>
      <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
    </TR>
    <% include( '/elements/tr-select-cust-fields.html' ) %>

    <TR>
      <TD ALIGN="right" VALIGN="center">Add package columns</TD>
        <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
    </TR>
  </TABLE>

<BR>
<INPUT TYPE="submit" VALUE="Get Report">

</FORM>

<% include('/elements/footer.html') %>
<%init>

die "access denied"
  unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
           $FS::CurrentUser::CurrentUser->access_right('List packages')
         );;

my $conf = new FS::Conf;

</%init>
<%once>

my %label = (
  'signupdate'     => 'Signup date',
);

</%once>