summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Conf.pm4
-rw-r--r--FS/FS/Schema.pm8
-rw-r--r--FS/FS/Upgrade.pm5
-rw-r--r--FS/FS/cust_main.pm2
4 files changed, 14 insertions, 5 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 34254c6..13d0704 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -3854,9 +3854,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 bf756d1..4f54772 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -466,7 +466,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' );
@@ -1521,8 +1521,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 a7fe99f..bf3e2ad 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 b37b0da..9f382ac 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1744,6 +1744,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')