stray closing /TABLE in the no-ticket case
[freeside.git] / httemplate / search / report_cust_event.html
1 <% include(
2       '/elements/header.html',
3       ( $cgi->param('failed') ? 'Failed billing events' : 'Billing events' ),
4    )
5 %>
6
7     <FORM ACTION="cust_event.html" METHOD="GET">
8     <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
9
10       <TR>
11         <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
12       </TR>
13
14       <% include( '/elements/tr-select-agent.html', 'disable_empty'=>0 ) %>
15
16       <% include( '/elements/tr-select-cust_main-status.html',
17                     'label' => 'Customer status',
18                     # this field is just called 'status'
19                 )
20       %>
21
22       <% include( '/elements/tr-select-part_event.html',
23                     'label'        => 'Events',
24                     'multiple'     => 1,
25                     'all_selected' => 1,
26                 )
27       %>
28
29 %     if ( $cgi->param('failed') ) {
30       <& /elements/tr-fixed.html,
31         'label'         => 'Event status',
32         'field'         => 'event_status',
33         'curr_value'    => 'failed',
34         'formatted_value' => 'Failed',
35       &>
36 %     } else {
37
38 % # 'initial' is not on here, since nobody needs to see it. also,
39 % # 'done_Y' = "done, and no_action is null, and statustext is null"
40 % # 'done_S' = "done, and no_action is null, and statustext is not null"
41 % # 'done_N' = "done, and no_action = 'Y'".
42       <& /elements/tr-select.html,
43         'label'         => 'Event status',
44         'field'         => 'event_status',
45         'multiple'      => 1,
46         'all_selected'  => 1,
47         'size'          => 5,
48         'options'       => [ qw( done_Y done_S done_N failed new locked ) ],
49         'option_labels' => { done_Y => 'Completed normally',
50                              done_S => 'Completed, with an error',
51                              done_N => 'Completed, no action taken',
52                              failed => 'Failed',
53                              new    => 'Not yet processed',
54                              locked => 'Running',
55                            },
56       &>
57 %     }
58
59       <% include( '/elements/tr-input-beginning_ending.html' ) %>
60
61     </TABLE>
62     <BR><INPUT TYPE="submit" VALUE="Get Report">
63     </FORM>
64
65 <% include('/elements/footer.html') %>
66 <%init>
67
68 die "access denied"
69   unless $FS::CurrentUser::CurrentUser->access_right('Billing event reports');
70
71 </%init>