X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=ed9b91a617be9a34e67a45ebbfc041516dc8a36f;hb=93ec97f7d887bfd8e172f476edd8477546b5d597;hp=91b304b5d71857fd6e1d2c5eb5fa4f4729f5fa1a;hpb=17451727f5f483394ca894a48e8fa3abe91d5a2b;p=freeside.git
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index 91b304b5d..ed9b91a61 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -1,23 +1,36 @@
<% ntable("#cccccc") %>
<% &ntable("#cccccc",2) %>
|
- Customer number |
+ <% mt('Customer number') |h %> |
<% $cust_main->display_custnum %> |
- Status |
+ <% mt('Status') |h %> |
<% 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 ) {
+
+ <% mt('Tags') |h %> |
+
+% 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 |
+ <% mt('Agent') |h %> |
<% $agent->agentnum %>: <% $agent->agent %> |
% }
@@ -26,28 +39,33 @@
% && ! $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 = '';
@@ -75,12 +93,12 @@
|
- Order taker |
+ <% mt('Order taker') |h %> |
<% $cust_main->otaker %> |
- Signup Date |
+ <% mt('Signup Date') |h %> |
<% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %> |
@@ -92,12 +110,21 @@
% : '';
- Date of Birth |
+ <% 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>
@@ -105,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>