diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-08-10 13:54:14 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-08-10 13:54:14 -0700 |
commit | 5a204201503f8e0db6087db6e53b84297cbc739a (patch) | |
tree | 6f17419140a68f9a0c783d2bc4e4b2029a79574c /httemplate/edit/cust_main | |
parent | d32459cf059ff29a5ddc4b83ca2bf50a7828454b (diff) |
add national id # handling for my, RT#18543
Diffstat (limited to 'httemplate/edit/cust_main')
-rw-r--r-- | httemplate/edit/cust_main/birthdate.html | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/httemplate/edit/cust_main/birthdate.html b/httemplate/edit/cust_main/birthdate.html index 5447a3ad0..5af819bdc 100644 --- a/httemplate/edit/cust_main/birthdate.html +++ b/httemplate/edit/cust_main/birthdate.html @@ -2,6 +2,37 @@ % # maybe put after the contact names? +% my $id_country = $conf->config('national_id-country'); +% if ( $id_country ) { +% if ( $id_country eq 'MY' ) { +% my($old, $nric) = ( '', ''); +% if ( $cust_main->national_id =~ /^\w\d{9}$/ ) { +% $old = $cust_main->national_id; +% } elsif ( $cust_main->national_id =~ /^\d{6}\-\d{2}\-\d{4}$/ ) { +% $nric = $cust_main->national_id; +% } else { +% warn "unknown national_id format"; + <INPUT TYPE="hidden" NAME="national_id0" VALUE="<% $cust_main->national_id |h %>"> +% } + + <% include( '/elements/tr-input-text.html', + 'field' => 'national_id1', + 'value' => $nric, + 'label' => 'NRIC', + ) + %> + <% include( '/elements/tr-input-text.html', + 'field' => 'national_id2', + 'value' => $old, + 'label' => 'Old IC/Passport', + ) + %> + +% } else { +% warn "unknown national_id-country $id_country"; +% } +% } + % if ( $conf->exists('cust_main-enable_birthdate') ) { <% include( '/elements/tr-input-date-field.html', { 'name' => 'birthdate', |