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/cust_main/Search.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'FS/FS/cust_main/Search.pm') diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index 31b89cd..b663c20 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.1