X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=6e90a0b4c8659f1f61ee570f473a6b7ee0f35774;hb=663b89d06a2c97fb0e7915ba409310fbefefea98;hp=69e120573ed89b2210acc8f414ae53b02c3663ec;hpb=8d4abaa99403699aa5b5f02e899d2ea33980f913;p=freeside.git
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index 69e120573..6e90a0b4c 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -1,63 +1,84 @@
-<%
- my( $cust_main ) = @_;
-%>
+<% ntable("#cccccc") %>
<% &ntable("#cccccc",2) %>
-<%= ntable("#cccccc") %> |
<%= &ntable("#cccccc",2) %>
|
Customer number |
- <%= $cust_main->custnum %> |
+ <% $cust_main->display_custnum %> |
-<%
- my @agents = qsearch( 'agent', {} );
- my $agent;
- unless ( scalar(@agents) == 1 ) {
- $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } );
-%>
+
+ Status |
+ <% ucfirst($cust_main->status) %> |
+
+% 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];
- }
+%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 %> |
+
+% }
- my @referrals = qsearch( 'part_referral', {} );
- unless ( scalar(@referrals) == 1 ) {
- my $referral = qsearchs('part_referral', {
- 'refnum' => $cust_main->refnum
- } );
-%>
+% if ( $cust_main->agent_custid
+% && ! $conf->exists('cust_main-default_agent_custid') ) {
- Advertising source |
- <%= $referral->refnum %>: <%= $referral->referral%> |
+ Agent customer ref# |
+ <% $cust_main->agent_custid %> |
+%
+% }
+
+% #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
+% } );
- Order taker |
- <%= $cust_main->otaker %> |
+ Advertising source |
+ <% $referral->refnum %>: <% $referral->referral%> |
+% }
+
+
Referring Customer |
+%
+% my $referring_cust_main = '';
+% if ( $cust_main->referral_custnum
+% && ( $referring_cust_main =
+% qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
+% )
+% ) {
+%
+
+<%$cust_main->referral_custnum %>:
<%
- my $referring_cust_main = '';
- if ( $cust_main->referral_custnum
- && ( $referring_cust_main =
- qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
- )
- ) {
-%>
-
-<%=$cust_main->referral_custnum %>:
-<%=
( $referring_cust_main->company
? $referring_cust_main->company. ' ('.
$referring_cust_main->last. ', '. $referring_cust_main->first.
@@ -65,11 +86,54 @@
: $referring_cust_main->last. ', '. $referring_cust_main->first
)
%>
+% }
-<% } %>
|
+
+ Order taker |
+ <% $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 $curuser = $FS::CurrentUser::CurrentUser;
+
+my @agentnums = $curuser->agentnums;
+%init>