X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=6e90a0b4c8659f1f61ee570f473a6b7ee0f35774;hb=a363a49c213f1e64add5c34a8a2bd17d154adfd3;hp=91b304b5d71857fd6e1d2c5eb5fa4f4729f5fa1a;hpb=17451727f5f483394ca894a48e8fa3abe91d5a2b;p=freeside.git diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index 91b304b5d..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 %> @@ -31,13 +44,18 @@ % % } -% + +% #if ( $cust_main->classnum ) { + + Class + <% $cust_main->classname || '(none)' %> + +% #} + % unless ( FS::part_referral->num_part_referral == 1 ) { % my $referral = qsearchs('part_referral', { % 'refnum' => $cust_main->refnum % } ); -% - Advertising source @@ -98,6 +116,15 @@ % } +% if ( $conf->exists('cust_main-require_censustract') ) { + + + Census tract + <% $cust_main->censustract %> + + +% } + <%init> @@ -105,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;