summaryrefslogtreecommitdiff
path: root/httemplate/misc/xmlhttp-cust_main-search.cgi
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-04-17 21:09:26 -0700
committerIvan Kohler <ivan@freeside.biz>2013-04-17 21:09:26 -0700
commit54156948ccda87655f9f4bb26a2747ab49b616ce (patch)
tree2a138569f102f3da6145446b4a2277c826f70d3d /httemplate/misc/xmlhttp-cust_main-search.cgi
parenta7ec2c2a6b5fcc26e8da765abdf4d459cc41a20a (diff)
move from legacy compat JSON to_json to modern JSON::XS encode_json, RT#22630
Diffstat (limited to 'httemplate/misc/xmlhttp-cust_main-search.cgi')
-rw-r--r--httemplate/misc/xmlhttp-cust_main-search.cgi8
1 files changed, 4 insertions, 4 deletions
diff --git a/httemplate/misc/xmlhttp-cust_main-search.cgi b/httemplate/misc/xmlhttp-cust_main-search.cgi
index acf7e70e2..73c9ff8ec 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');
@@ -22,14 +22,14 @@
% @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 +47,7 @@
% city => $_->city,
% };
% }
-<% objToJson($return) %>
+<% encode_json($return) %>\
% }
<%init>