X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=6e90a0b4c8659f1f61ee570f473a6b7ee0f35774;hb=90d8aaced90a89974109de6a016a62bee4a7457c;hp=2cfe0263f8c2d9333d16521c0c79536dd5d84743;hpb=fcc3ddbd03b97b88bf04f6984d7fd3c443fb14b5;p=freeside.git diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index 2cfe0263f..6e90a0b4c 100644 --- a/httemplate/view/cust_main/misc.html +++ b/httemplate/view/cust_main/misc.html @@ -10,12 +10,25 @@ <% ucfirst($cust_main->status) %> -%my $agent; -%if ( $num_agents == 1 ) { -% my @agents = qsearchs( 'agent', {} ); -% $agent = $agents[0]; -%} else { -% $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } ); +% my @part_tag = $cust_main->part_tag; +% if ( $conf->config('cust_tag-location') =~ /^(cust_misc|)$/ && @part_tag ) { + + Tags + +% foreach my $part_tag ( @part_tag ) { + tagcolor) + ? 'STYLE="background-color:#'.$part_tag->tagcolor.'"' + : '' %> + ><% $part_tag->tagname.': '. $part_tag->tagdesc |h %> +
+% } + + +% } + +%unless ( scalar(@agentnums) == 1 +% && !$curuser->access_right('View customers of all agents') ) { +% my $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } ); Agent <% $agent->agentnum %>: <% $agent->agent %> @@ -119,8 +132,8 @@ my( $cust_main ) = @_; my $conf = new FS::Conf; my $date_format = ($conf->config('date_format') || "%m/%d/%Y"); -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]; +my $curuser = $FS::CurrentUser::CurrentUser; + +my @agentnums = $curuser->agentnums;