remove "failed billing events" report, and add "completed with an error" status searc...
[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-payby.html',
23                     'label'        => 'Customer payment type',
24                     'payby_type'   => 'cust',
25                     'multiple'     => 1,
26                     'all_selected' => 1,
27                 )
28       %>
29
30       <% include( '/elements/tr-select-part_event.html',
31                     'label'        => 'Events',
32                     'multiple'     => 1,
33                     'all_selected' => 1,
34                 )
35       %>
36
37 %     if ( $cgi->param('failed') ) {
38       <& /elements/tr-fixed.html,
39         'label'         => 'Event status',
40         'field'         => 'event_status',
41         'curr_value'    => 'failed',
42         'formatted_value' => 'Failed',
43       &>
44 %     } else {
45
46 % # 'initial' is not on here, since nobody needs to see it. also,
47 % # 'done_Y' = "done, and no_action is null, and statustext is null"
48 % # 'done_S' = "done, and no_action is null, and statustext is not null"
49 % # 'done_N' = "done, and no_action = 'Y'".
50       <& /elements/tr-select.html,
51         'label'         => 'Event status',
52         'field'         => 'event_status',
53         'multiple'      => 1,
54         'all_selected'  => 1,
55         'size'          => 5,
56         'options'       => [ qw( done_Y done_S done_N failed new locked ) ],
57         'option_labels' => { done_Y => 'Completed normally',
58                              done_S => 'Completed, with an error',
59                              done_N => 'Completed, no action taken',
60                              failed => 'Failed',
61                              new    => 'Not yet processed',
62                              locked => 'Running',
63                            },
64       &>
65 %     }
66
67       <% include( '/elements/tr-input-beginning_ending.html' ) %>
68
69     </TABLE>
70     <BR><INPUT TYPE="submit" VALUE="Get Report">
71     </FORM>
72
73 <% include('/elements/footer.html') %>
74 <%init>
75
76 die "access denied"
77   unless $FS::CurrentUser::CurrentUser->access_right('Billing event reports');
78
79 </%init>