X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fsearch-cust_main.html;h=dbcc2ed0b589ac11765dd6579375b389a0835abf;hb=990e040448691dd4bd26c871274c65204cb7707b;hp=ca91b4027533799f1722a0722b0c5dc08ba9ef73;hpb=b19897e1db4c110d7d7e8b52800cda5ab58ce9e0;p=freeside.git diff --git a/httemplate/elements/search-cust_main.html b/httemplate/elements/search-cust_main.html index ca91b4027..dbcc2ed0b 100644 --- a/httemplate/elements/search-cust_main.html +++ b/httemplate/elements/search-cust_main.html @@ -1,27 +1,29 @@ -<% - my( %opt ) = @_; - $opt{'field_name'} ||= 'custnum'; - - my $cust_main = ''; - if ( $opt{'value'} ) { - $cust_main = qsearchs( - 'table' => 'cust_main', - 'hashref' => { 'custnum' => $opt{'value'} }, - 'extra_sql' => " AND ". $FS::CurrentUser::CurrentUser->agentnums_sql, - ); - } -%> - - + - - - + +% if ( $opt{'find_button'} ) { + +% } + + -<%= include('/elements/xmlhttp.html', +<% include('/elements/xmlhttp.html', 'url' => $p. 'misc/xmlhttp-cust_main-search.cgi', 'subs' => [ 'smart_search' ], ) @@ -29,7 +31,7 @@ +<%init> + +my( %opt ) = @_; +$opt{'field_name'} ||= 'custnum'; + +my $value = $opt{'curr_value'} || $opt{'value'}; + +my $cust_main = ''; +if ( $value ) { + $cust_main = qsearchs({ + 'table' => 'cust_main', + 'hashref' => { 'custnum' => $value }, + 'extra_sql' => " AND ". $FS::CurrentUser::CurrentUser->agentnums_sql, + }); +} +