diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-06-13 14:35:06 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-06-13 14:35:06 -0700 |
| commit | 7adee3e2e061d08fef5f47e0df8ac818db8d04d2 (patch) | |
| tree | 19e39fb5b20633148388d061237552e961714d14 /FS | |
| parent | 14f3259eef6cbc440a9ce0cdc20ee2cde87c41b0 (diff) | |
quick payment entry: if both a custnum and an agent_custid match, allow the user to pick, RT#18100
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/cust_main/Search.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index be4470501..4b159ff3c 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -142,10 +142,12 @@ sub smart_search { my $num = $1; if ( $num =~ /^(\d+)$/ && $num <= 2147483647 ) { #need a bigint custnum? wow + my $agent_custid_null = $conf->exists('cust_main-default_agent_custid') + ? ' AND agent_custid IS NULL ' : ''; push @cust_main, qsearch( { 'table' => 'cust_main', 'hashref' => { 'custnum' => $num, %options }, - 'extra_sql' => " AND $agentnums_sql", #agent virtualization + 'extra_sql' => " AND $agentnums_sql $agent_custid_null", } ); } |
