X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=6e90a0b4c8659f1f61ee570f473a6b7ee0f35774;hb=170aa1e8078280e7c03a6ebfc67280de66fa1b9d;hp=060da87dd0be5c9cc4734ef764ebf259c697b660;hpb=987b49fbf7754b4954018e258d27a6ea72499f84;p=freeside.git
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index 060da87dd..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 |
@@ -85,13 +103,24 @@
% if ( $conf->exists('cust_main-enable_birthdate') ) {
-% my $dt = DateTime->from_epoch(epoch => $cust_main->birthdate,
-% time_zone=>'floating',
-% );
+% my $dt = $cust_main->birthdate ne ''
+% ? DateTime->from_epoch( 'epoch' => $cust_main->birthdate,
+% 'time_zone' =>'floating',
+% )
+% : '';
Date of Birth |
- <% $cust_main->birthdate ne '' ? $dt->strftime($date_format) : '' %> |
+ <% $dt ? $dt->strftime($date_format) : '' %> |
+
+
+% }
+
+% if ( $conf->exists('cust_main-require_censustract') ) {
+
+
+ Census tract |
+ <% $cust_main->censustract %> |
% }
@@ -103,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;
%init>