fix unapplied payment report, RT#73048, fallout from #25944
[freeside.git] / httemplate / search / report_sqlradius_usage.html
1 %# some overlap with report_sqlradius_usage_custnum.html
2 <& /elements/header.html, mt($title) &>
3
4 <FORM ACTION="sqlradius_usage.html" METHOD="GET">
5
6 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
7
8 <& /elements/tr-select-agent.html,
9   'multiple'      => 1,
10   'disable_empty' => 1,
11   #'empty_label'   => 'all',
12 &>
13
14 %#more future-proof to actually ask all exports if they ->can('usage_sessions')
15 % my @exporttypes = qw( sqlradius sqlradius_withdomain broadband_sqlradius
16 %                       phone_sqlradius radiator
17 %                     );
18 <& /elements/tr-select-table.html,
19   'label'         => 'Export',
20   'table'         => 'part_export',
21   'name_col'      => 'label',
22   'hashref'       => {},
23   'extra_sql'     => ' WHERE exporttype IN ( '.
24                                             join(',', map "'$_'", @exporttypes).
25                                           ')',
26   'disable_empty' => 1,
27   'order_by'      => 'ORDER BY exportnum',
28 &>
29
30 <& /elements/tr-input-beginning_ending.html &>
31
32 </TABLE>
33
34 <BR>
35 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
36
37 </FORM>
38
39 <& /elements/footer.html &>
40 <%init>
41
42 die "access denied"
43   unless $FS::CurrentUser::CurrentUser->access_right('Usage: RADIUS sessions');
44   # yes?
45
46 my $title = 'Data Usage Report';
47
48 </%init>