[freeside-commits] branch FREESIDE_2_3_BRANCH updated. fd64501b96f4e149ceb3896cc334b330910afe9a
Ivan
ivan at 420.am
Tue Aug 28 02:05:57 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via fd64501b96f4e149ceb3896cc334b330910afe9a (commit)
from 63392290c6036b94622e770ba88f2275d6e4e5cf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fd64501b96f4e149ceb3896cc334b330910afe9a
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Aug 28 02:05:56 2012 -0700
remove validation from national_id old format per customer, RT#18543
diff --git a/FS/FS/cust_main/NationalID.pm b/FS/FS/cust_main/NationalID.pm
index cc8d556..a742b76 100644
--- a/FS/FS/cust_main/NationalID.pm
+++ b/FS/FS/cust_main/NationalID.pm
@@ -36,11 +36,15 @@ sub set_national_id_from_cgi {
} elsif ( $cgi->param('national_id2') =~ /\S/ ) {
my $oldic = $cgi->param('national_id2');
$oldic =~ s/\s//g;
- if ( $oldic =~ /^\w\d{9}$/ ) {
+
+ # can you please remove validation for "Old IC/Passport:" field, customer
+ # will have other field format like, RF/123456, I/5234234 ...
+ #if ( $oldic =~ /^\w\d{9}$/ ) {
$self->national_id($oldic);
- } else {
- $error ||= "Illegal Old IC/Passport: ". $cgi->param('national_id2');
- }
+ #} else {
+ # $error ||= "Illegal Old IC/Passport: ". $cgi->param('national_id2');
+ #}
+
} else {
$error ||= 'Either NRIC or Old IC/Passport is required';
}
diff --git a/httemplate/edit/cust_main/birthdate.html b/httemplate/edit/cust_main/birthdate.html
index e856e13..4d5554f 100644
--- a/httemplate/edit/cust_main/birthdate.html
+++ b/httemplate/edit/cust_main/birthdate.html
@@ -4,13 +4,13 @@
% 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}$/ ) {
+% if ( $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 %>">
+% } else { # elsif ( $cust_main->national_id =~ /^\w\d{9}$/ ) {
+% $old = $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',
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index 7e8c3f4..a372be6 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -107,13 +107,13 @@
% 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}$/ ) {
+% if ( $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>
+% } else { # elsif ( $cust_main->national_id =~ /^\w\d{9}$/ ) {
+ <TD ALIGN="right"><% mt('Old IC/Passport') |h %></TD>
+% #} else {
+% # warn "unknown national_id format";
+%# <TD ALIGN="right"></TD>
% }
<TD BGCOLOR="#ffffff"><% $cust_main->national_id |h %></TD>
</TR>
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main/NationalID.pm | 12 ++++++++----
httemplate/edit/cust_main/birthdate.html | 12 ++++++------
httemplate/view/cust_main/misc.html | 12 ++++++------
3 files changed, 20 insertions(+), 16 deletions(-)
More information about the freeside-commits
mailing list