From 73e3de28477eff6b4e2e4ce7f00af2268eb8b04c Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 24 Apr 2007 22:36:24 +0000 Subject: 1528 add driver's license field, mask it and ssn (backport) --- FS/FS/Conf.pm | 7 +++++++ FS/FS/Schema.pm | 2 ++ FS/FS/Setup.pm | 8 ++++++++ FS/FS/cust_main.pm | 18 ++++++++++++++++++ 4 files changed, 35 insertions(+) (limited to 'FS') diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 6cea990d5..f32b87a57 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1171,6 +1171,13 @@ httemplate/docs/config.html 'type' => 'checkbox', }, + { + 'key' => 'show_stateid', + 'section' => 'UI', + 'description' => "Turns on display/collection of driver's license/state issued id numbers in the web interface. Sometimes required by electronic check (ACH) processors.", + 'type' => 'checkbox', + }, + { 'key' => 'agent_defaultpkg', 'section' => 'UI', diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index acd81dbe4..5af75913a 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -408,6 +408,8 @@ sub tables_hashref { # 'middle', 'varchar', 'NULL', $char_d, '', '', 'first', 'varchar', '', $char_d, '', '', 'ss', 'varchar', 'NULL', 11, '', '', + 'stateid', 'varchar', 'NULL', $char_d, '', '', + 'stateid_state', 'varchar', 'NULL', $char_d, '', '', 'birthdate' ,@date_type, '', '', 'signupdate',@date_type, '', '', 'company', 'varchar', 'NULL', $char_d, '', '', diff --git a/FS/FS/Setup.pm b/FS/FS/Setup.pm index 4864cfea8..17101a745 100644 --- a/FS/FS/Setup.pm +++ b/FS/FS/Setup.pm @@ -475,6 +475,14 @@ sub msgcat_messages { 'en_US' => 'Title', }, + 'stateid' => { + 'en_US' => 'Driver\'s License', + }, + + 'stateid_state' => { + 'en_US' => 'Driver\'s License State', + }, + ); } diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index c9c3efa01..55f012a0e 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1220,6 +1220,8 @@ sub check { || $self->ut_country('country') || $self->ut_anything('comments') || $self->ut_numbern('referral_custnum') + || $self->ut_textn('stateid') + || $self->ut_textn('stateid_state') ; #barf. need message catalogs. i18n. etc. $error .= "Please select an advertising source." @@ -4272,6 +4274,22 @@ sub fuzzy_search { } +=item masked FIELD + + Returns a masked version of the named field + +=cut + +sub masked { + my ($self, $field) = @_; + + # Show last four + + 'x'x(length($self->getfield($field))-4). + substr($self->getfield($field), (length($self->getfield($field))-4)); + +} + =back =head1 SUBROUTINES -- cgit v1.2.1