summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-08-10 13:54:14 -0700
committerIvan Kohler <ivan@freeside.biz>2012-08-10 13:54:14 -0700
commit5a204201503f8e0db6087db6e53b84297cbc739a (patch)
tree6f17419140a68f9a0c783d2bc4e4b2029a79574c /httemplate/view/cust_main
parentd32459cf059ff29a5ddc4b83ca2bf50a7828454b (diff)
add national id # handling for my, RT#18543
Diffstat (limited to 'httemplate/view/cust_main')
-rw-r--r--httemplate/view/cust_main/misc.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index dc6da53f1..9713b2469 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -102,6 +102,26 @@
<TD BGCOLOR="#ffffff"><% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %></TD>
</TR>
+% my $id_country = $conf->config('national_id-country');
+% if ( $id_country ) {
+% if ( $id_country eq 'MY' ) {
+ <TR>
+% my($old, $nric) = ( '', '');
+% if ( $cust_main->national_id =~ /^\w\d{9}$/ ) {
+ <TD ALIGN="right"><% mt('Old IC/Passport') |h %></TD>
+% } elsif ( $cust_main->national_id =~ /^\d{6}\-\d{2}\-\d{4}$/ ) {
+ <TD ALIGN="right"><% mt('NRIC') |h %></TD>
+% } else {
+% warn "unknown national_id format";
+ <TD ALIGN="right"></TD>
+% }
+ <TD BGCOLOR="#ffffff"><% $cust_main->national_id |h %></TD>
+ </TR>
+% } 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,