diff options
author | levinse <levinse> | 2011-02-15 04:20:21 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-02-15 04:20:21 +0000 |
commit | 9ab9e3293274cdba0ddbd2df21adb575f8b987ef (patch) | |
tree | 2be69023e53f59fbf23e1666819c1a691d10d474 /httemplate/misc | |
parent | e2e281e075e2932b61b57541c694e1af75b7d304 (diff) |
quick payment tool improvements, RT10698
Diffstat (limited to 'httemplate/misc')
-rw-r--r-- | httemplate/misc/xmlhttp-cust_main-search.cgi | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/httemplate/misc/xmlhttp-cust_main-search.cgi b/httemplate/misc/xmlhttp-cust_main-search.cgi index 481bea264..c71953ba9 100644 --- a/httemplate/misc/xmlhttp-cust_main-search.cgi +++ b/httemplate/misc/xmlhttp-cust_main-search.cgi @@ -25,9 +25,23 @@ % 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> |