projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b26d3c0
)
contact search, RT#25687 (also possibly #25583 and #22991)
author
Ivan Kohler
<ivan@freeside.biz>
Sat, 2 Nov 2013 20:58:13 +0000
(13:58 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Sat, 2 Nov 2013 20:58:13 +0000
(13:58 -0700)
FS/FS/cust_main/Search.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_main/Search.pm
b/FS/FS/cust_main/Search.pm
index
362a6aa
..
16db712
100644
(file)
--- a/
FS/FS/cust_main/Search.pm
+++ b/
FS/FS/cust_main/Search.pm
@@
-433,15
+433,30
@@
sub smart_search {
'first' => $first }, #
%fuzopts
);
'first' => $first }, #
%fuzopts
);
- }
+ push @cust_main, FS::cust_main::Search->fuzzy_search(
+ { 'contact.last' => $last, #fuzzy hashref
+ 'contact.first' => $first }, #
+ %fuzopts
+ );
+ }
foreach my $field ( 'first', 'last', 'company' ) {
foreach my $field ( 'first', 'last', 'company' ) {
- push @cust_main,
- FS::cust_main::Search->fuzzy_search( { $field => $value }, %fuzopts );
+ push @cust_main, FS::cust_main::Search->fuzzy_search(
+ { $field => $value },
+ %fuzopts
+ );
+ }
+ foreach my $field ( 'first', 'last' ) {
+ push @cust_main, FS::cust_main::Search->fuzzy_search(
+ { "contact.$field" => $value },
+ %fuzopts
+ );
}
if ( $conf->exists('address1-search') ) {
push @cust_main,
FS::cust_main::Search->fuzzy_search(
}
if ( $conf->exists('address1-search') ) {
push @cust_main,
FS::cust_main::Search->fuzzy_search(
- { 'cust_location.address1' => $value }, %fuzopts );
+ { 'cust_location.address1' => $value },
+ %fuzopts
+ );
}
}
}
}