summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view/cust_main')
-rw-r--r--httemplate/view/cust_main/billing.html7
-rw-r--r--httemplate/view/cust_main/misc.html31
-rwxr-xr-xhttemplate/view/cust_main/packages.html3
-rw-r--r--httemplate/view/cust_main/packages/services.html5
-rw-r--r--httemplate/view/cust_main/tickets.html29
5 files changed, 18 insertions, 57 deletions
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html
index 54c180bdd..c8d0c47cd 100644
--- a/httemplate/view/cust_main/billing.html
+++ b/httemplate/view/cust_main/billing.html
@@ -5,12 +5,7 @@ Billing information
%if ( $FS::CurrentUser::CurrentUser->access_right('Bill customer now')
% && ! $cust_main->is_encrypted($cust_main->payinfo)
% ) {
-%# (<A HREF="<% $p %>misc/bill.cgi?<% $cust_main->custnum %>">Bill now</A>)
- (<% include('/elements/bill.html',
- custnum => $cust_main->custnum,
- label => 'Bill now',
- url => $p.'view/cust_main.cgi?'.$cust_main->custnum,
- ) %>)
+ (<A HREF="<% $p %>misc/bill.cgi?<% $cust_main->custnum %>">Bill now</A>)
% }
<% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index 6e90a0b4c..2cfe0263f 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -10,25 +10,12 @@
<TD BGCOLOR="#ffffff"><FONT COLOR="#<% $cust_main->statuscolor %>"><B><% ucfirst($cust_main->status) %></B></FONT></TD>
</TR>
-% my @part_tag = $cust_main->part_tag;
-% if ( $conf->config('cust_tag-location') =~ /^(cust_misc|)$/ && @part_tag ) {
-<TR>
- <TD ALIGN="right">Tags</TD>
- <TD BGCOLOR="#ffffff">
-% foreach my $part_tag ( @part_tag ) {
- <FONT <% length($part_tag->tagcolor)
- ? 'STYLE="background-color:#'.$part_tag->tagcolor.'"'
- : '' %>
- ><% $part_tag->tagname.': '. $part_tag->tagdesc |h %></FONT>
- <BR>
-% }
- </TD>
-</TR>
-% }
-
-%unless ( scalar(@agentnums) == 1
-% && !$curuser->access_right('View customers of all agents') ) {
-% my $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } );
+%my $agent;
+%if ( $num_agents == 1 ) {
+% my @agents = qsearchs( 'agent', {} );
+% $agent = $agents[0];
+%} else {
+% $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } );
<TR>
<TD ALIGN="right">Agent</TD>
<TD BGCOLOR="#ffffff"><% $agent->agentnum %>: <% $agent->agent %></TD>
@@ -132,8 +119,8 @@ my( $cust_main ) = @_;
my $conf = new FS::Conf;
my $date_format = ($conf->config('date_format') || "%m/%d/%Y");
-my $curuser = $FS::CurrentUser::CurrentUser;
-
-my @agentnums = $curuser->agentnums;
+my $sth = dbh->prepare('SELECT COUNT(*) FROM agent') or die dbh->errstr;
+$sth->execute or die $sth->errstr;
+my $num_agents = $sth->fetchrow_arrayref->[0];
</%init>
diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html
index 811ac3c98..3ac4861c3 100755
--- a/httemplate/view/cust_main/packages.html
+++ b/httemplate/view/cust_main/packages.html
@@ -159,8 +159,7 @@ my %conf_opt = (
#for services.html
'svc_external-skip_manual' => $conf->exists('svc_external-skip_manual'),
'legacy_link' => $conf->exists('legacy_link'),
- 'svc_broadband-manage_link' => scalar($conf->config('svc_broadband-manage_link')),
- 'maestro-status_test' => $conf->exists('maestro-status_test'),
+ 'svc_broadband-manage_link' => $conf->config('svc_broadband-manage_link'),
);
#subroutines
diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html
index 6e30922c5..0fe7931d8 100644
--- a/httemplate/view/cust_main/packages/services.html
+++ b/httemplate/view/cust_main/packages/services.html
@@ -58,11 +58,6 @@
% if ( $curuser->access_right('Unprovision customer service') ) {
<FONT SIZE="-2">(&nbsp;<%svc_unprovision_link($cust_svc)%>&nbsp;)</FONT>
% }
-
-% if ( $part_svc->svcdb eq 'svc_pbx' && $opt{'maestro-status_test'} ){
- <FONT SIZE="-2">(&nbsp;<A HREF="<% $p %>misc/maestro-customer_status-test.html?<% $cust_pkg->custnum.'+'.$cust_svc->svcnum %>">Test maestro status</A>&nbsp;)</FONT>
-% }
-
</TD>
</TR>
% }
diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html
index e90ae5276..e1f9a131e 100644
--- a/httemplate/view/cust_main/tickets.html
+++ b/httemplate/view/cust_main/tickets.html
@@ -1,31 +1,17 @@
-<FORM METHOD="GET" NAME="CreateTicketForm" STYLE="display:inline">
-<SCRIPT TYPE="text/javascript">
-function updateTicketLink() {
- var link = document.getElementById('CreateTicketLink');
- var selector = document.getElementById('Queue')
- link.href = "<% $new_base.'?'.
- join(';', map(
- { ($_ eq 'Queue') ? () : "$_=$new_param{$_}"}
- keys %new_param),'Queue=') %>" + selector.options[selector.selectedIndex].value;
-}
-</SCRIPT>
-<A id="CreateTicketLink" HREF="<% $new_link %>">Create new ticket</A>
- in queue
+<FORM METHOD="GET" ACTION="<% $new_base %>" NAME="CreateTicketForm">
+<INPUT TYPE="submit" VALUE="Create new ticket">
+in queue
+<SELECT NAME="Queue">
% my %queues = FS::TicketSystem->queues();
-% if( $conf->exists('ticket_system-force_default_queueid') ) {
-<B><% $queues{$new_param{'Queue'}} %></B>
-<INPUT TYPE="hidden" NAME="Queue" VALUE="<% $new_param{'Queue'} %>">
-% }
-% else {
-<SELECT NAME="Queue" id="Queue" onchange="updateTicketLink()">
-% foreach my $queueid ( sort { $queues{$a} cmp $queues{$b} } keys %queues ) {
+% foreach my $queueid ( keys %queues ) {
% #should consider whether the user has ACL to create ticket in each queue
<OPTION VALUE="<% $queueid %>"
<% $queueid == $new_param{'Queue'} ? 'SELECTED' : '' %>
><% $queues{$queueid} |h %>
% }
</SELECT>
-<SCRIPT DEFER TYPE="text/javascript">updateTicketLink();</SCRIPT>
+% foreach my $param ( grep { $_ ne 'Queue' } keys %new_param ) {
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $new_param{$param} |h %>">
% }
</FORM>
<BR>
@@ -93,7 +79,6 @@ function updateTicketLink() {
<%init>
-my( $conf ) = new FS::Conf;
my( $cust_main ) = @_;
my( @tickets ) = $cust_main->tickets;