X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=6e90a0b4c8659f1f61ee570f473a6b7ee0f35774;hb=f099e0dfa8f438a84d8f1bce36f5e5bda60481e5;hp=9528db2437f6bb3ba762364e60462242a3fae671;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1;p=freeside.git
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index 9528db243..6e90a0b4c 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -1,41 +1,42 @@
-%
-% my( $cust_main ) = @_;
-% my $conf = new FS::Conf;
-% my $date_format = ($conf->config('date_format') || "%m/%d/%Y");
-%
-
-
<% ntable("#cccccc") %>
<% &ntable("#cccccc",2) %>
|
Customer number |
- <% $cust_main->custnum %> |
+ <% $cust_main->display_custnum %> |
Status |
<% ucfirst($cust_main->status) %> |
-%
-% my @agents = qsearch( 'agent', {} );
-% my $agent;
-% unless ( scalar(@agents) == 1 ) {
-% $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } );
-%
-
+% my @part_tag = $cust_main->part_tag;
+% if ( $conf->config('cust_tag-location') =~ /^(cust_misc|)$/ && @part_tag ) {
- Agent |
- <% $agent->agentnum %>: <% $agent->agent %> |
+ Tags |
+
+% foreach my $part_tag ( @part_tag ) {
+ tagcolor)
+ ? 'STYLE="background-color:#'.$part_tag->tagcolor.'"'
+ : '' %>
+ ><% $part_tag->tagname.': '. $part_tag->tagdesc |h %>
+
+% }
+ |
-%
-% } else {
-% $agent = $agents[0];
-% }
-%
-% if ( $cust_main->agent_custid ) {
-%
+% }
+
+%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 %> |
+
+% }
+% if ( $cust_main->agent_custid
+% && ! $conf->exists('cust_main-default_agent_custid') ) {
Agent customer ref# |
@@ -43,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 |
@@ -97,16 +103,37 @@
% 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 %> |
% }
+<%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;
+%init>