[freeside-commits] freeside/httemplate/search report_rt_transaction.html, 1.2, 1.3 rt_transaction.html, 1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Mon Jun 14 23:06:56 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv26752
Modified Files:
report_rt_transaction.html rt_transaction.html
Log Message:
ticket # and account(customer) options for time worked report
Index: report_rt_transaction.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_rt_transaction.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- report_rt_transaction.html 18 Jul 2008 22:31:08 -0000 1.2
+++ report_rt_transaction.html 15 Jun 2010 06:06:54 -0000 1.3
@@ -8,6 +8,24 @@
<% include ( '/elements/tr-select-otaker.html' ) %>
+ <% include ( '/elements/tr-input-text.html',
+ 'label' => 'Ticket #',
+ 'field' => 'ticketid',
+ )
+ %>
+
+ <TR>
+ <TD>Account</TD>
+ <TD>
+ <SELECT NAME="svcnum">
+ <OPTION VALUE="">(all)
+% foreach my $svc_acct (@svc_acct) {
+ <OPTION VALUE="<% $svc_acct->svcnum %>"><% $svc_acct->username %></OPTION>
+% }
+ </SELECT>
+ </TD>
+ </TR>
+
</TABLE>
<BR>
@@ -21,4 +39,18 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('List rating data');
+my $conf = new FS::Conf;
+
+my @pkgparts = $conf->config('support_packages');
+
+my @svc_acct = ();
+if ( @pkgparts ) {
+ @svc_acct = qsearch({
+ 'table' => 'svc_acct',
+ 'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '.
+ ' LEFT JOIN cust_pkg USING ( pkgnum ) ',
+ 'extra_sql' => 'WHERE pkgpart IN ('. join(',', @pkgparts). ')',
+ });
+}
+
</%init>
Index: rt_transaction.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/rt_transaction.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- rt_transaction.html 26 May 2010 18:37:08 -0000 1.3
+++ rt_transaction.html 15 Jun 2010 06:06:54 -0000 1.4
@@ -77,6 +77,10 @@
$where .= " AND Users.name = '$1' ";
}
+if ( $cgi->param('ticketid') =~ /^\s*(\d+)\s*$/ ) {
+ $where .= " AND Tickets.ID = $1";
+}
+
my $query = {
'select' => "Transactions.*, Tickets.Id AS ticketid, Tickets.Subject, Users.name as otaker, $transactiontime AS transaction_time",
#'table' => 'Transactions',
More information about the freeside-commits
mailing list