X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=e7d9272c3ccbe6c758069200f269958699d7b23a;hb=e6d20615692495e78975a958af76bfef06d427f5;hp=983c469e73a051eb2d56d49916fc62d687483b99;hpb=9811b8ce65909a293810ddbcd8c9b5ca963fba01;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 983c469e7..e7d9272c3 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -397,6 +397,8 @@ sub insert { warn " inserting $self\n" if $DEBUG > 1; + $self->signupdate(time) unless $self->signupdate; + my $error = $self->SUPER::insert; if ( $error ) { $dbh->rollback if $oldAutoCommit; @@ -1210,6 +1212,7 @@ sub check { || $self->ut_name('last') || $self->ut_name('first') || $self->ut_snumbern('birthdate') + || $self->ut_snumbern('signupdate') || $self->ut_textn('company') || $self->ut_text('address1') || $self->ut_textn('address2') @@ -2515,6 +2518,9 @@ sub realtime_bop { $content{customer_ip} = $payip if length($payip); + $content{invoice_number} = $options{'invnum'} + if exists($options{'payip'}) && length($options{'invnum'}); + if ( $method eq 'CC' ) { $content{card_number} = $payinfo; @@ -2580,7 +2586,7 @@ sub realtime_bop { 'action' => $action1, 'description' => $options{'description'}, 'amount' => $amount, - 'invoice_number' => $options{'invnum'}, + #'invoice_number' => $options{'invnum'}, 'customer_id' => $self->custnum, 'last_name' => $paylast, 'first_name' => $payfirst, @@ -4015,10 +4021,10 @@ sub fuzzy_search { Accepts the following options: I, the string to search for. The string will be searched for as a customer number, phone number, name or company name, -first searching for an exact match then fuzzy and substring matches (in some -cases - see the source code for the exact heuristics used). +as an exact, or, in some cases, a substring or fuzzy match (see the source code +for the exact heuristics used). -Any additional options treated as an additional qualifier on the search +Any additional options are treated as an additional qualifier on the search (i.e. I). Returns a (possibly empty) array of FS::cust_main objects. @@ -4168,7 +4174,9 @@ sub smart_search { 'extra_sql' => "$sql AND $agentnums_sql", #agent virtualization } ); - unless ( @cust_main ) { #no exact match, trying substring/fuzzy + #always do substring & fuzzy, + #getting complains searches are not returning enough + #unless ( @cust_main ) { #no exact match, trying substring/fuzzy #still some false laziness w/ search/cust_main.cgi @@ -4229,7 +4237,7 @@ sub smart_search { FS::cust_main->fuzzy_search( { $field => $value }, @fuzopts ); } - } + #} #eliminate duplicates my %saw = ();