From cfcc4c14a40c84d1603c707066e7644aefef5690 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 7 May 2012 11:18:13 -0700 Subject: add spouse_birthdate, RT#17577 --- FS/FS/Conf.pm | 13 ++++++++++--- FS/FS/Schema.pm | 1 + FS/FS/cust_main/Search.pm | 12 ++++++++++-- 3 files changed, 21 insertions(+), 5 deletions(-) (limited to 'FS') diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index bf2f189a4..85e618631 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -3543,7 +3543,14 @@ and customer address. Include units.', { 'key' => 'cust_main-enable_birthdate', 'section' => 'UI', - 'descritpion' => 'Enable tracking of a birth date with each customer record', + 'description' => 'Enable tracking of a birth date with each customer record', + 'type' => 'checkbox', + }, + + { + 'key' => 'cust_main-enable_spouse_birthdate', + 'section' => 'UI', + 'description' => 'Enable tracking of a spouse birth date with each customer record', 'type' => 'checkbox', }, @@ -4660,14 +4667,14 @@ and customer address. Include units.', { 'key' => 'cust_main-edit_signupdate', 'section' => 'UI', - 'descritpion' => 'Enable manual editing of the signup date.', + 'description' => 'Enable manual editing of the signup date.', 'type' => 'checkbox', }, { 'key' => 'svc_acct-disable_access_number', 'section' => 'UI', - 'descritpion' => 'Disable access number selection.', + 'description' => 'Disable access number selection.', 'type' => 'checkbox', }, diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 625e34fad..086f86e8d 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -857,6 +857,7 @@ sub tables_hashref { 'stateid', 'varchar', 'NULL', $char_d, '', '', 'stateid_state', 'varchar', 'NULL', $char_d, '', '', 'birthdate' ,@date_type, '', '', + 'spouse_birthdate' ,@date_type, '', '', 'signupdate',@date_type, '', '', 'dundate', @date_type, '', '', 'company', 'varchar', 'NULL', $char_d, '', '', diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index 31b89cd31..b663c20f8 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -467,6 +467,14 @@ bool listref of start date, end date +=item birthdate + +listref of start date, end date + +=item spouse_birthdate + +listref of start date, end date + =item payby listref @@ -599,7 +607,7 @@ sub search { # dates ## - foreach my $field (qw( signupdate )) { + foreach my $field (qw( signupdate birthdate spouse_birthdate )) { next unless exists($params->{$field}); @@ -610,7 +618,7 @@ sub search { "cust_main.$field >= $beginning", "cust_main.$field <= $ending"; - if(defined $hour) { + if($field eq 'signupdate' && defined $hour) { if ($dbh->{Driver}->{Name} =~ /Pg/i) { push @where, "extract(hour from to_timestamp(cust_main.$field)) = $hour"; } -- cgit v1.2.1