X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=2cfe0263f8c2d9333d16521c0c79536dd5d84743;hb=d84fbd3987192e9bece5fc074dd7507dd1e2c7b7;hp=fc033b97095c2d79ec3a4c2c40bfdde6e98e9da2;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e;p=freeside.git
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index fc033b970..2cfe0263f 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -1,40 +1,29 @@
-%
-% my( $cust_main ) = @_;
-% my $conf = new FS::Conf;
-%
-
-
<% 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 } );
-%
-
-
-
- Agent |
- <% $agent->agentnum %>: <% $agent->agent %> |
-
-%
-% } else {
-% $agent = $agents[0];
-% }
-%
-% if ( $cust_main->agent_custid ) {
-%
+%my $agent;
+%if ( $num_agents == 1 ) {
+% my @agents = qsearchs( 'agent', {} );
+% $agent = $agents[0];
+%} else {
+% $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# |
@@ -42,13 +31,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 |
@@ -90,5 +84,43 @@
<% $cust_main->otaker %> |
+
+ 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 $sth = dbh->prepare('SELECT COUNT(*) FROM agent') or die dbh->errstr;
+$sth->execute or die $sth->errstr;
+my $num_agents = $sth->fetchrow_arrayref->[0];
+%init>