X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fmisc.html;h=d9bf91e1700baa60c889cc7b28d4d807a751c451;hp=c59f6af090622b054c3f800f542bfc91268123e4;hb=4dc075fc38008d1c6cbe9b88b2bdb32bdc92adbf;hpb=c62b6d38ca0e19c2e936c4b1659357babe73d1d7 diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index c59f6af09..d9bf91e17 100644 --- a/httemplate/view/cust_main/misc.html +++ b/httemplate/view/cust_main/misc.html @@ -1,14 +1,5 @@ -<% ntable("#cccccc") %><% &ntable("#cccccc",2) %> - - - <% mt('Customer number') |h %> - <% $cust_main->display_custnum %> - - - - <% mt('Status') |h %> - <% ucfirst($cust_main->status) %> - +<% mt('Miscellaneous information') |h %> + % my @part_tag = $cust_main->part_tag; % if ( $conf->config('cust_tag-location') =~ /^(cust_misc|)$/ && @part_tag ) { @@ -26,15 +17,6 @@ % } -%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') ) { @@ -47,26 +29,33 @@ % #if ( $cust_main->classnum ) { - - + + % #} +% if ( $cust_main->salesnum ) { + + + + +% } + % unless ( FS::part_referral->num_part_referral == 1 ) { % my $referral = qsearchs('part_referral', { % 'refnum' => $cust_main->refnum % } ); - - + + % } - - + - - + + - - + + +% my $id_country = $conf->config('national_id-country'); +% if ( $id_country ) { +% if ( $id_country eq 'MY' ) { + +% my($old, $nric) = ( '', ''); +% if ( $cust_main->national_id =~ /^\d{6}\-\d{2}\-\d{4}$/ ) { + +% } else { # elsif ( $cust_main->national_id =~ /^\w\d{9}$/ ) { + +% #} else { +% # warn "unknown national_id format"; +%# +% } + + +% } else { +% warn "unknown national_id-country $id_country"; +% } +% } + % if ( $conf->exists('cust_main-enable_birthdate') ) { % my $dt = $cust_main->birthdate ne '' % ? DateTime->from_epoch( 'epoch' => $cust_main->birthdate, @@ -110,26 +119,54 @@ % : ''; - - + + + + +% if ( $conf->exists('cust_main-enable_spouse') +% and $cust_main->spouse_birthdate ) { +% my $dt = DateTime->from_epoch( +% 'epoch' => $cust_main->spouse_birthdate, +% 'time_zone' =>'floating' +% ); + + + + + + +% } +% } # enable_birthdate + +% if ( $conf->exists('cust_main-enable_anniversary_date') ) { +% my $dt = $cust_main->anniversary_date ne '' +% ? DateTime->from_epoch( 'epoch' => $cust_main->anniversary_date, +% 'time_zone' =>'floating', +% ) +% : ''; + + + + % } -% if ( $conf->exists('cust_main-require_censustract') ) { +% if ( $cust_main->district ) { - - + + % } + % if ( $conf->exists('ticket_system-selfservice_edit_subject') ) { - - + + % } @@ -138,7 +175,7 @@ <% $cust_main->pvf($_)->widget('HTML', 'view', $cust_main->getfield($_)) %> % } -
<% mt('Agent') |h %><% $agent->agentnum %>: <% $agent->agent %>
<% mt('Class') |h %><% $cust_main->classname || '('.emt('none').')' %><% mt('Class') |h %><% $cust_main->classname || '('.emt('none').')' %>
<% mt('Sales Person') |h %><% $cust_main->salesperson |h %>
<% mt('Advertising source') |h %><% $referral->refnum %>: <% $referral->referral%><% mt('Advertising source') |h %><% $referral->refnum %>: <% $referral->referral%>
<% mt('Referring Customer') |h %> + <% mt('Referring Customer') |h %> % % my $referring_cust_main = ''; % if ( $cust_main->referral_custnum @@ -93,15 +82,35 @@
<% mt('Order taker') |h %><% $cust_main->otaker %><% mt('Order taker') |h %><% $cust_main->otaker %>
<% mt('Signup Date') |h %><% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %><% mt('Signup Date') |h %><% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %>
<% mt('NRIC') |h %><% mt('Old IC/Passport') |h %><% $cust_main->national_id |h %>
<% mt('Date of Birth') |h %><% $dt ? $dt->strftime($date_format) : '' %><% mt('Date of Birth') |h %><% $dt ? $dt->strftime($date_format) : '' %>
<% mt('Spouse Date of Birth') |h %><% $dt ? $dt->strftime($date_format) : '' %>
<% mt('Anniversary Date') |h %><% $dt ? $dt->strftime($date_format) : '' %>
<% mt('Census tract') |h %><% $cust_main->censustract %><% mt('Tax district') |h %><% $cust_main->ship_location->district %>
<% mt('Edit ticket subjects') %><% $cust_main->edit_subject ? 'yes' : 'no' %><% emt('Edit ticket subjects') %><% $cust_main->edit_subject ? 'yes' : 'no' %>
+ <%init> my( $cust_main ) = @_; @@ -149,4 +186,9 @@ my $curuser = $FS::CurrentUser::CurrentUser; my @agentnums = $curuser->agentnums; +my $status_label = $cust_main->status_label; +if ($cust_main->is_status_delay_cancel) { + $status_label .= ' (Cancelled)'; +} +