% my @part_tag = $cust_main->part_tag; % if ( $conf->config('cust_tag-location') =~ /^(cust_misc|)$/ && @part_tag ) { % } %unless ( scalar(@agentnums) == 1 % && !$curuser->access_right('View customers of all agents') ) { % my $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } ); % } % if ( $cust_main->agent_custid % && ! $conf->exists('cust_main-default_agent_custid') ) { % % } % #if ( $cust_main->classnum ) { % #} % unless ( FS::part_referral->num_part_referral == 1 ) { % my $referral = qsearchs('part_referral', { % 'refnum' => $cust_main->refnum % } ); % } % if ( $conf->exists('cust_main-enable_birthdate') ) { % my $dt = $cust_main->birthdate ne '' % ? DateTime->from_epoch( 'epoch' => $cust_main->birthdate, % 'time_zone' =>'floating', % ) % : ''; % } % if ( $conf->exists('cust_main-require_censustract') ) { % } % if ( $cust_main->district ) { % } % if ( $conf->exists('ticket_system-selfservice_edit_subject') ) { % } % foreach (sort { $a cmp $b } $cust_main->virtual_fields) { <% $cust_main->pvf($_)->widget('HTML', 'view', $cust_main->getfield($_)) %> % }
<% mt('Customer number') |h %> <% $cust_main->display_custnum %>
<% mt('Status') |h %> <% ucfirst($cust_main->status) %>
<% mt('Tags') |h %> % foreach my $part_tag ( @part_tag ) { tagcolor) ? 'STYLE="background-color:#'.$part_tag->tagcolor.'"' : '' %> ><% $part_tag->tagname.': '. $part_tag->tagdesc |h %>
% }
<% mt('Agent') |h %> <% $agent->agentnum %>: <% $agent->agent %>
<% mt('Agent customer ref#') |h %> <% $cust_main->agent_custid %>
<% mt('Class') |h %> <% $cust_main->classname || '('.emt('none').')' %>
<% mt('Advertising source') |h %> <% $referral->refnum %>: <% $referral->referral%>
<% mt('Referring Customer') |h %> % % my $referring_cust_main = ''; % if ( $cust_main->referral_custnum % && ( $referring_cust_main = % qsearchs('cust_main', { custnum => $cust_main->referral_custnum } ) % ) % ) { % <%$referring_cust_main->display_custnum %>: <% ( $referring_cust_main->company ? $referring_cust_main->company. ' ('. $referring_cust_main->last. ', '. $referring_cust_main->first. ')' : $referring_cust_main->last. ', '. $referring_cust_main->first ) %> % }
<% mt('Order taker') |h %> <% $cust_main->otaker %>
<% mt('Signup Date') |h %> <% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %>
<% mt('Date of Birth') |h %> <% $dt ? $dt->strftime($date_format) : '' %>
<% mt('Census tract ([_1])', $cust_main->censusyear) |h %> <% $cust_main->censustract %>
<% mt('Tax district') |h %> <% $cust_main->district %>
<% mt('Edit ticket subjects') %> <% $cust_main->edit_subject ? 'yes' : 'no' %>
<%init> 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;