show imported region and rate #s, RT#83146
[freeside.git] / httemplate / edit / cust_main / birthdate.html
1 <% ntable("#cccccc", 2) %>
2
3 % # maybe put after the contact names?
4
5 % my $id_country = $conf->config('national_id-country');
6 %  if ( $id_country ) {
7 %   if ( $id_country eq 'MY' ) {
8 %     my($old, $nric) = ( '', '');
9 %     if ( $cust_main->national_id =~ /^\d{6}\-\d{2}\-\d{4}$/ ) {
10 %       $nric = $cust_main->national_id;
11 %     } else { # elsif ( $cust_main->national_id =~ /^\w\d{9}$/ ) {
12 %       $old = $cust_main->national_id;
13 %     #} else {
14 %     #  warn "unknown national_id format";
15 %#       <INPUT TYPE="hidden" NAME="national_id0" VALUE="<% $cust_main->national_id |h %>">
16 %     }
17
18       <% include( '/elements/tr-input-text.html',
19                     'field' => 'national_id1',
20                     'value' => $nric,
21                     'label' => 'NRIC',
22                 )
23       %>
24       <% include( '/elements/tr-input-text.html',
25                     'field' => 'national_id2',
26                     'value' => $old,
27                     'label' => 'Old IC/Passport',
28                 )
29       %>
30
31 %   } else {
32 %     warn "unknown national_id-country $id_country";
33 %   }
34 % }
35
36 % if ( $conf->exists('cust_main-enable_birthdate') ) {
37   <& /elements/tr-input-date-field.html, {
38         'name'        => 'birthdate',
39         'value'       => $cust_main->birthdate,
40         'label'       => 'Date of Birth',
41         'format'      => ( $conf->config('date_format') || "%m/%d/%Y" ),
42         'usedatetime' => 1,
43         'noinit'      => $noinit++,
44      }
45   &>
46
47 %   if ( $conf->exists('cust_main-enable_spouse') ) {
48   <& /elements/tr-input-date-field.html, {
49         'name'        => 'spouse_birthdate',
50         'value'       => $cust_main->spouse_birthdate,
51         'label'       => 'Spouse Date of Birth',
52         'format'      => ( $conf->config('date_format') || "%m/%d/%Y" ),
53         'usedatetime' => 1,
54         'noinit'      => $noinit++,
55       }
56   &>
57 %   } # if enable_spouse
58 % } # if enable_birthdate 
59
60 % if ( $conf->exists('cust_main-enable_anniversary_date') ) {
61   <% include( '/elements/tr-input-date-field.html', {
62                 'name'        => 'anniversary_date',
63                 'value'       => $cust_main->anniversary_date,
64                 'label'       => 'Anniversary Date',
65                 'format'      => ( $conf->config('date_format') || "%m/%d/%Y" ),
66                 'usedatetime' => 1,
67                 'noinit'      => $noinit++,
68             })
69   %>
70 % }
71
72 </TABLE>
73 <%init>
74
75 my( $cust_main, %opt ) = @_;
76 my $conf = new FS::Conf;
77
78 my $noinit = 0;
79
80 </%init>