#substring
my @company_hashrefs = ();
- if ( length($value) >= 3 ) {
+ if ( length($value) >= 4 ) {
@company_hashrefs = (
{ 'company' => { op=>'ILIKE', value=>"%$value%" }, },
{ 'ship_company' => { op=>'ILIKE', value=>"%$value%" }, },
},
);
- } elsif ( length($value) >= 3 ) {
+ } elsif ( length($value) >= 4 ) {
@hashrefs = (
{ 'first' => { op=>'ILIKE', value=>"%$value%" }, },
}
- if ( $conf->exists('address1-search') && length($value) >= 3 ) {
+ if ( $conf->exists('address1-search') && length($value) >= 4 ) {
push @cust_main, qsearch( {
table => 'cust_main',
'contact.first' => $first }, #
%fuzopts
);
- }
+ }
+
foreach my $field ( 'first', 'last', 'company', 'ship_company' ) {
push @cust_main, FS::cust_main::Search->fuzzy_search(
{ $field => $value },