diff options
author | ivan <ivan> | 2004-12-02 09:59:48 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-12-02 09:59:48 +0000 |
commit | 0d1d2630e726ab4ce32bab9c3e4a889eee43fcb4 (patch) | |
tree | 34d6d7d9dc3ed2ab2bd5fafb585330fc20355b53 /httemplate | |
parent | b81d94452ba28c79036ab417bd32df54a583f324 (diff) |
second big RT integration checkin, customer linking/delinking interface
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/images/small-logo.png | bin | 5261 -> 4887 bytes | |||
-rw-r--r-- | httemplate/index.html | 12 | ||||
-rwxr-xr-x | httemplate/search/cust_main.cgi | 32 |
3 files changed, 38 insertions, 6 deletions
diff --git a/httemplate/images/small-logo.png b/httemplate/images/small-logo.png Binary files differindex a8fe80791..1e415e6d8 100644 --- a/httemplate/images/small-logo.png +++ b/httemplate/images/small-logo.png diff --git a/httemplate/index.html b/httemplate/index.html index 6283c2217..360cc55e9 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -13,7 +13,7 @@ <IMG BORDER=0 ALT="freeside" SRC="images/small-logo.png"> </td> <td align=left rowspan=2> <!-- valign="top" --> - <font size=7>Billing</font> + <font size=6><%= $conf->config('company_name') %> Billing</font> </td> <td align=right valign=top>Logged in as <b><%= getotaker %></b> </td> @@ -25,8 +25,7 @@ <tr> <td align=right> <FONT SIZE="-2"> - Freeside <%= $FS::VERSION %><BR> - <A HREF="http://www.sisd.com/freeside">Freeside home page</A><BR> + <A HREF="http://www.sisd.com/freeside">Freeside</A> v<%= $FS::VERSION %><BR> <A HREF="docs/">Documentation</A><BR> </FONT> </td> @@ -35,8 +34,7 @@ <td bgcolor=#000000></td> <td align=left> <FONT SIZE="-2"> - RT <%= $RT::VERSION %><BR> - <A HREF="http://www.bestpractical.com/rt">RT home page</A><BR> + <A HREF="http://www.bestpractical.com/rt">RT<A> v<%= $RT::VERSION %><BR> <A HREF="http://wiki.bestpractical.com/">Documentation</A><BR> </FONT> </td> @@ -93,6 +91,10 @@ <TR><TD> <BR><FONT SIZE="+1"><A HREF="rt/">Ticketing Main</A></FONT> <BR> + <UL> + <LI><A HREF="search/cust_main.cgi?browse=tickets">Customers sorted by active tickets</A> + <LI><A HREF="">Active tickets not assigned to a customer</A> + <LI> </TD></TR> </TABLE> diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 27f23de36..c4b0ce0cd 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -48,6 +48,9 @@ $limit .= " OFFSET $offset" if $offset; my $total = 0; my(@cust_main, $sortby, $orderby); +my @select = (); +my @addl_headers = (); +my @addl_cols = (); if ( $cgi->param('browse') || $cgi->param('otaker_on') || $cgi->param('agentnum_on') @@ -65,6 +68,12 @@ if ( $cgi->param('browse') } elsif ( $query eq 'company' ) { $sortby=\*company_sort; $orderby = "ORDER BY LOWER(company || ' ' || last || ' ' || first )"; + } elsif ( $query eq 'tickets' ) { + $sortby = \*tickets_sort; + $orderby = "ORDER BY tickets DESC"; + push @select, FS::TicketSystem->sql_customer_tickets. " as tickets"; + push @addl_headers, 'Tickets'; + push @addl_cols, 'tickets'; } else { die "unknown browse field $query"; } @@ -136,7 +145,14 @@ if ( $cgi->param('browse') } } - @cust_main = qsearch('cust_main', \%search, '', + my $select; + if ( @select ) { + $select = 'cust_main.*, '. join (', ', @select); + } else { + $select = '*'; + } + + @cust_main = qsearch('cust_main', \%search, $select, "$addl_qual $orderby $limit" ); # foreach my $cust_main ( @just_cust_main ) { @@ -312,6 +328,10 @@ if ( defined dbdef->table('cust_main')->column('ship_last') ) { END } +foreach my $addl_header ( @addl_headers ) { + print "<TH>$addl_header</TH>"; +} + print <<END; <TH>Packages</TH> <TH COLSPAN=2>Services</TH> @@ -370,6 +390,12 @@ END END } + foreach my $addl_col ( @addl_cols ) { + print qq!<TD ROWSPAN=$rowspan><A HREF="XXXnotyetXXX">!. + $cust_main->get($addl_col). + "</A></TD>"; + } + my($n1)=''; foreach ( @{$all_pkgs{$custnum}} ) { my $pkgnum = $_->pkgnum; @@ -424,6 +450,10 @@ sub custnum_sort { $a->getfield('custnum') <=> $b->getfield('custnum'); } +sub tickets_sort { + $a->getfield('tickets') <=> $b->getfield('tickets'); +} + sub custnumsearch { my $custnum = $cgi->param('custnum_text'); |