X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fxmlhttp-cust_main-search.cgi;h=b3bf4681be856b33a2a0affb3e685b58b7787364;hb=74f252e841ae742b7defe1042e8e9d3d7c513867;hp=acf7e70e2e91fadf32f471d1ded72123a930615d;hpb=fa2326a36a5ce74e8c9dab504c3274688a297c04;p=freeside.git diff --git a/httemplate/misc/xmlhttp-cust_main-search.cgi b/httemplate/misc/xmlhttp-cust_main-search.cgi index acf7e70e2..b3bf4681b 100644 --- a/httemplate/misc/xmlhttp-cust_main-search.cgi +++ b/httemplate/misc/xmlhttp-cust_main-search.cgi @@ -5,7 +5,7 @@ % # cust_main-agent_custid-format') eq 'ww?d+' % $return = findbycustnum_or_agent_custid($1); % } -<% objToJson($return) %> +<% encode_json($return) %>\ % } elsif ( $sub eq 'smart_search' ) { % % my $string = $cgi->param('arg'); @@ -17,19 +17,20 @@ % $_->balance, % $_->ucfirst_status, % $_->statuscolor, -% scalar($_->open_cust_bill) +% scalar($_->open_cust_bill), +% $_->display_custnum, % ], % @cust_main % ]; % -<% objToJson($return) %> +<% encode_json($return) %>\ % } elsif ( $sub eq 'invnum_search' ) { % % my $string = $cgi->param('arg'); % if ( $string =~ /^(\d+)$/ ) { % my $inv = qsearchs('cust_bill', { 'invnum' => $1 }); % my $return = $inv ? findbycustnum($inv->custnum) : []; -<% objToJson($return) %> +<% encode_json($return) %>\ % } else { #return nothing [] % } @@ -47,7 +48,7 @@ % city => $_->city, % }; % } -<% objToJson($return) %> +<% encode_json($return) %>\ % } <%init> @@ -66,7 +67,8 @@ sub findbycustnum { $c->balance, $c->ucfirst_status, $c->statuscolor, - scalar($c->open_cust_bill) + scalar($c->open_cust_bill), + $c->display_custnum, ]; } @@ -94,6 +96,7 @@ sub findbycustnum_or_agent_custid { $_->ucfirst_status, $_->statuscolor, scalar($_->open_cust_bill), + $_->display_custnum, ], qsearch({