1 <% include('/elements/header.html', 'Time worked summary report criteria' ) %>
3 <FORM ACTION="rt_ticket.html" METHOD="GET">
7 <% include ( '/elements/tr-input-beginning_ending.html' ) %>
9 <& /elements/tr-select.html,
10 label => 'Time category:',
12 options => [ '', 'development', 'support' ],
13 option_labels => { '' => 'all' },
14 curr_value => 'development',
17 <% include ( '/elements/tr-select-otaker.html' ) %>
20 <TD ALIGN="right">Account:</TD>
22 <SELECT NAME="svcnum">
23 <OPTION VALUE="">(all)
24 % foreach my $svc_acct (@svc_acct) {
25 <OPTION VALUE="<% $svc_acct->svcnum %>"><% $svc_acct->username %></OPTION>
34 <INPUT TYPE="submit" VALUE="Search">
38 <% include('/elements/footer.html') %>
42 unless $FS::CurrentUser::CurrentUser->access_right('List rating data');
44 my $conf = new FS::Conf;
46 my @pkgparts = $conf->config('support_packages');
51 'table' => 'svc_acct',
52 'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '.
53 ' LEFT JOIN cust_pkg USING ( pkgnum ) ',
54 'extra_sql' => 'WHERE pkgpart IN ('. join(',', @pkgparts). ')',
55 'order_by' => 'ORDER BY username',
59 # get a list of TimeValue-type custom fields
60 my $CurrentUser = RT::CurrentUser->new();
61 $CurrentUser->LoadByName($FS::CurrentUser::CurrentUser->username);
62 die "RT not configured" unless $CurrentUser->id;
63 my $CFs = RT::CustomFields->new($CurrentUser);
65 $CFs->Limit(FIELD => 'LookupType',
66 OPERATOR => 'ENDSWITH',
67 VALUE => 'RT::Transaction');
69 $CFs->Limit(FIELD => 'Type',
70 VALUE => 'TimeValue');