summaryrefslogtreecommitdiff
path: root/httemplate/search/report_cust_event.html
blob: 84eb45f96567bd69fe73d89ae9d1c3cbce2c8378 (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
<% include(
      '/elements/header.html',
      ( $cgi->param('failed') ? 'Failed billing events' : 'Billing events' ),
   )
%>

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

    <FONT CLASS="fsinnerbox-title"><% emt('Search options') %></FONT>
    <TABLE CLASS="fsinnerbox">

      <% include( '/elements/tr-select-agent.html', 'disable_empty'=>0 ) %>

      <% include( '/elements/tr-select-cust_main-status.html',
                    'label' => 'Customer status',
                    # this field is just called 'status'
                )
      %>

      <% include( '/elements/tr-select-part_event.html',
                    'label'        => 'Events',
                    'multiple'     => 1,
                    'all_selected' => 1,
                )
      %>

%     if ( $cgi->param('failed') ) {
      <& /elements/tr-fixed.html,
        'label'         => 'Event status',
        'field'         => 'event_status',
        'curr_value'    => 'failed',
        'formatted_value' => 'Failed',
      &>
%     } else {

% # 'initial' is not on here, since nobody needs to see it. also,
% # 'done_Y' = "done, and no_action is null, and statustext is null"
% # 'done_S' = "done, and no_action is null, and statustext is not null"
% # 'done_N' = "done, and no_action = 'Y'".
      <& /elements/tr-select.html,
        'label'         => 'Event status',
        'field'         => 'event_status',
        'multiple'      => 1,
        'all_selected'  => 1,
        'size'          => 6,
        'options'       => [ qw( done_Y done_S done_N failed new locked ) ],
        'option_labels' => { done_Y => 'Completed normally',
                             done_S => 'Completed, with an error',
                             done_N => 'Completed, no action taken',
                             failed => 'Failed',
                             new    => 'Not yet processed',
                             locked => 'Running',
                           },
      &>
%     }

      <% include( '/elements/tr-input-beginning_ending.html' ) %>

    </TABLE>
    <BR><INPUT TYPE="submit" VALUE="Get Report">
    </FORM>

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

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Billing event reports');

</%init>