X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=6e90a0b4c8659f1f61ee570f473a6b7ee0f35774;hb=663b89d06a2c97fb0e7915ba409310fbefefea98;hp=b0fab03008ba8899b83e8e28a6bc830b8b424b79;hpb=3050434f62122e73d748dac26a5e70193b444c0a;p=freeside.git
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index b0fab0300..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 |
@@ -91,10 +97,43 @@
<% $cust_main->otaker %> |
-
- Date of Birth |
- <% $cust_main->birthdate ? time2str($date_format, $cust_main->birthdate) : '' %> |
-
+
+ Signup Date |
+ <% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %> |
+
+
+% if ( $conf->exists('cust_main-enable_birthdate') ) {
+% my $dt = $cust_main->birthdate ne ''
+% ? DateTime->from_epoch( 'epoch' => $cust_main->birthdate,
+% 'time_zone' =>'floating',
+% )
+% : '';
+
+
+ Date of Birth |
+ <% $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>