projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
legacy agent_custid field should be as searchable as actual custnum, right? at least...
[freeside.git]
/
FS
/
FS
/
cust_main.pm
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
b5e6892
..
952aa73
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-5289,6
+5289,9
@@
sub smart_search {
}
} elsif ( $search =~ /^\s*(\d+)\s*$/ ) { # customer # search
}
} elsif ( $search =~ /^\s*(\d+)\s*$/ ) { # customer # search
+ # (also try agent_custid)
+ # (regex needs tweaking if your
+ # legacy cust numbers have letters)
push @cust_main, qsearch( {
'table' => 'cust_main',
push @cust_main, qsearch( {
'table' => 'cust_main',
@@
-5296,6
+5299,12
@@
sub smart_search {
'extra_sql' => " AND $agentnums_sql", #agent virtualization
} );
'extra_sql' => " AND $agentnums_sql", #agent virtualization
} );
+ push @cust_main, qsearch( {
+ 'table' => 'cust_main',
+ 'hashref' => { 'agent_custid' => $1, %options },
+ 'extra_sql' => " AND $agentnums_sql", #agent virtualization
+ } );
+
} elsif ( $search =~ /^\s*(\S.*\S)\s+\((.+), ([^,]+)\)\s*$/ ) {
my($company, $last, $first) = ( $1, $2, $3 );
} elsif ( $search =~ /^\s*(\S.*\S)\s+\((.+), ([^,]+)\)\s*$/ ) {
my($company, $last, $first) = ( $1, $2, $3 );