diff options
author | Mark Wells <mark@freeside.biz> | 2014-03-14 16:59:18 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2014-03-14 16:59:18 -0700 |
commit | cdc349ac42247cd97cd475918b75a8e8e71ec0c2 (patch) | |
tree | e8a3efeb88081c80661a6865f23ebd272fba5509 /FS | |
parent | b2f85194e8e090dd6fb05acbe4575dd9440be134 (diff) |
add spouse name to customer records, #24919
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Conf.pm | 4 | ||||
-rw-r--r-- | FS/FS/Schema.pm | 8 | ||||
-rw-r--r-- | FS/FS/Upgrade.pm | 5 | ||||
-rw-r--r-- | FS/FS/cust_main.pm | 2 |
4 files changed, 14 insertions, 5 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index d7269d91d..521ccce65 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -3860,9 +3860,9 @@ and customer address. Include units.', }, { - 'key' => 'cust_main-enable_spouse_birthdate', + 'key' => 'cust_main-enable_spouse', 'section' => 'UI', - 'description' => 'Enable tracking of a spouse birth date with each customer record', + 'description' => 'Enable tracking of a spouse\'s name and date of birth with each customer record', 'type' => 'checkbox', }, diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 9aa865607..6a7f38c6c 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -448,7 +448,7 @@ sub tables_hashref { my $char_d = 80; #default maxlength for text fields #my(@date_type) = ( 'timestamp', '', '' ); - my @date_type = ( 'int', 'NULL', '' ); + my @date_type = ( 'int', 'NULL', '' ); my @perl_type = ( 'text', 'NULL', '' ); my @money_type = ( 'decimal', '', '10,2' ); my @money_typen = ( 'decimal', 'NULL', '10,2' ); @@ -1095,8 +1095,10 @@ sub tables_hashref { 'stateid_state', 'varchar', 'NULL', $char_d, '', '', 'national_id', 'varchar', 'NULL', $char_d, '', '', 'birthdate' ,@date_type, '', '', - 'spouse_birthdate' ,@date_type, '', '', - 'anniversary_date' ,@date_type, '', '', + 'spouse_last', 'varchar', 'NULL', 2*$char_d, '', '', + 'spouse_first', 'varchar', 'NULL', $char_d, '', '', + 'spouse_birthdate', @date_type, '', '', + 'anniversary_date', @date_type, '', '', 'signupdate',@date_type, '', '', 'dundate', @date_type, '', '', 'company', 'varchar', 'NULL', $char_d, '', '', diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index d70c874b4..f559d2e0a 100644 --- a/FS/FS/Upgrade.pm +++ b/FS/FS/Upgrade.pm @@ -91,6 +91,11 @@ sub upgrade_config { && length($conf->config('usps_webtools-userid')) > 0 && ! $conf->exists('address_standardize_method'); + # this option has been renamed/expanded + if ( $conf->exists('cust_main-enable_spouse_birthdate') ) { + $conf->touch('cust_main-enable_spouse'); + $conf->delete('cust_main-enable_spouse_birthdate'); + } } sub upgrade_overlimit_groups { diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 4bd9114b2..203b39ab0 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1756,6 +1756,8 @@ sub check { || $self->ut_name('first') || $self->ut_snumbern('signupdate') || $self->ut_snumbern('birthdate') + || $self->ut_namen('spouse_last') + || $self->ut_namen('spouse_first') || $self->ut_snumbern('spouse_birthdate') || $self->ut_snumbern('anniversary_date') || $self->ut_textn('company') |