X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=a0ab403e8d0317c32e7793364d5b0442e994b279;hb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;hp=fdc5ba4ea6ba8816200db721a45531ea2f006f5e;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0;p=freeside.git diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index fdc5ba4ea..a0ab403e8 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) %> + - - + + - + -% -% 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 ) { - - + + -% -% } 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 } ); + + + + +% } + +% if ( $cust_main->agent_custid +% && ! $conf->exists('cust_main-default_agent_custid') ) { - + % % } -% + +% #if ( $cust_main->classnum ) { + + + + +% #} + % unless ( FS::part_referral->num_part_referral == 1 ) { % my $referral = qsearchs('part_referral', { % 'refnum' => $cust_main->refnum % } ); -% - - + % } - + - + + + + + + % if ( $conf->exists('cust_main-enable_birthdate') ) { +% my $dt = $cust_main->birthdate ne '' +% ? DateTime->from_epoch( 'epoch' => $cust_main->birthdate, +% 'time_zone' =>'floating', +% ) +% : ''; + + + + + + +% } + +% if ( $conf->exists('cust_main-enable_spouse_birthdate') ) { +% my $dt = $cust_main->spouse_birthdate ne '' +% ? DateTime->from_epoch( 'epoch' => $cust_main->spouse_birthdate, +% 'time_zone' =>'floating', +% ) +% : ''; + + + + + + +% } + +% if ( $conf->exists('cust_main-require_censustract') ) { - - + + % } -
Customer number<% $cust_main->custnum %><% mt('Customer number') |h %><% $cust_main->display_custnum %>
Status<% mt('Status') |h %> <% ucfirst($cust_main->status) %>
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 %> +
+% } +
<% mt('Agent') |h %><% $agent->agentnum %>: <% $agent->agent %>
Agent customer ref#<% mt('Agent customer ref#') |h %> <% $cust_main->agent_custid %>
<% mt('Class') |h %><% $cust_main->classname || '('.emt('none').')' %>
Advertising source<% mt('Advertising source') |h %> <% $referral->refnum %>: <% $referral->referral%>
Referring Customer<% mt('Referring Customer') |h %> % % my $referring_cust_main = ''; @@ -71,7 +77,7 @@ % -<%$cust_main->referral_custnum %>: +<%$referring_cust_main->display_custnum %>: <% ( $referring_cust_main->company ? $referring_cust_main->company. ' ('. @@ -87,18 +93,86 @@
Order taker<% mt('Order taker') |h %> <% $cust_main->otaker %>
<% mt('Signup Date') |h %><% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %>
<% mt('Date of Birth') |h %><% $dt ? $dt->strftime($date_format) : '' %>
<% mt('Spouse Date of Birth') |h %><% $dt ? $dt->strftime($date_format) : '' %>
Date of Birth<% $cust_main->birthdate ? time2str($date_format, $cust_main->birthdate) : '' %> + <% mt('Census tract ([_1])', $cust_main->ship_location->censusyear) |h %> + <% $cust_main->ship_location->censustract %>
+% if ( $cust_main->district ) { + + + <% mt('Tax district') |h %> + <% $cust_main->ship_location->district %> + + +% } + + +% if ( $conf->exists('ticket_system-selfservice_edit_subject') ) { + + + <% mt('Edit ticket subjects') %> + <% $cust_main->edit_subject ? 'yes' : 'no' %> + + +% } + +% foreach (sort { $a cmp $b } $cust_main->virtual_fields) { + <% $cust_main->pvf($_)->widget('HTML', 'view', $cust_main->getfield($_)) %> +% } + + +<%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; +