X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=ed9b91a617be9a34e67a45ebbfc041516dc8a36f;hb=61a65ecdb3fa33392a258df1e38fc9a37d750b52;hp=121c0522a8e2d84bcd3ac94efd64d116cba4e52f;hpb=7c1d5f4ce778b4ab56301a042076e7c1dce46152;p=freeside.git
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index 121c0522a..ed9b91a61 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -1,65 +1,71 @@
-%
-% 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 %> |
+ <% mt('Customer number') |h %> |
+ <% $cust_main->display_custnum %> |
- Status |
+ <% mt('Status') |h %> |
<% 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 %> |
+ <% mt('Tags') |h %> |
+
+% 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 } );
+
+ <% mt('Agent') |h %> |
+ <% $agent->agentnum %>: <% $agent->agent %> |
+
+% }
+% if ( $cust_main->agent_custid
+% && ! $conf->exists('cust_main-default_agent_custid') ) {
- Agent customer ref# |
+ <% mt('Agent customer ref#') |h %> |
<% $cust_main->agent_custid %> |
%
% }
-%
+
+% #if ( $cust_main->classnum ) {
+
+ <% mt('Class') |h %> |
+ <% $cust_main->classname || '('.emt('none').')' %> |
+
+% #}
+
% unless ( FS::part_referral->num_part_referral == 1 ) {
% my $referral = qsearchs('part_referral', {
% 'refnum' => $cust_main->refnum
% } );
-%
-
- Advertising source |
+ <% mt('Advertising source') |h %> |
<% $referral->refnum %>: <% $referral->referral%> |
% }
- Referring Customer |
+ <% mt('Referring Customer') |h %> |
%
% my $referring_cust_main = '';
@@ -87,28 +93,47 @@
|
- Order taker |
+ <% mt('Order taker') |h %> |
<% $cust_main->otaker %> |
- Signup Date |
+ <% mt('Signup Date') |h %> |
<% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %> |
% if ( $conf->exists('cust_main-enable_birthdate') ) {
-% eval "use DateTime;";
-% die $@ if $@;
-% 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 ? $dt->strftime($date_format) : '' %> |
+ <% mt('Date of Birth') |h %> |
+ <% $dt ? $dt->strftime($date_format) : '' %> |
+
+
+% }
+
+% if ( $conf->exists('cust_main-require_censustract') ) {
+
+
+ <% mt('Census tract') |h %> |
+ <% $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>