[freeside-commits] freeside/httemplate/misc xmlhttp-cust_main-search.cgi, 1.8, 1.8.2.1
Erik Levinson
levinse at wavetail.420.am
Mon Feb 14 20:20:23 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv15688/httemplate/misc
Modified Files:
Tag: FREESIDE_2_1_BRANCH
xmlhttp-cust_main-search.cgi
Log Message:
quick payment tool improvements, RT10698
Index: xmlhttp-cust_main-search.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/xmlhttp-cust_main-search.cgi,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -w -d -r1.8 -r1.8.2.1
--- xmlhttp-cust_main-search.cgi 22 Oct 2010 18:03:47 -0000 1.8
+++ xmlhttp-cust_main-search.cgi 15 Feb 2011 04:20:20 -0000 1.8.2.1
@@ -25,8 +25,22 @@
% my @cust_main = smart_search( 'search' => $string,
% 'no_fuzzy_on_exact' => 1, #pref?
% );
-% my $return = [ map [ $_->custnum, $_->name ], @cust_main ];
+% my $return = [ map [ $_->custnum, $_->name, $_->balance ], @cust_main ];
+%
+<% objToJson($return) %>
+% } elsif ( $sub eq 'invnum_search' ) {
%
+% my $string = $cgi->param('arg');
+% my $inv = qsearchs('cust_bill', { 'invnum' => $string });
+% my $return = [];
+% if ( $inv ) {
+% my $cust_main = qsearchs({
+% 'table' => 'cust_main',
+% 'hashref' => { 'custnum' => $inv->custnum },
+% 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
+% });
+% $return = [ $cust_main->custnum, $cust_main->name, $cust_main->balance ];
+% }
<% objToJson($return) %>
% }
<%init>
More information about the freeside-commits
mailing list