diff options
author | levinse <levinse> | 2011-02-15 04:20:19 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-02-15 04:20:19 +0000 |
commit | 99a7600cf4b5986b6f2be8ee1ad871ca77799c6b (patch) | |
tree | 344528d4334979db92b15c21a802d34cc36c0d9c /httemplate/misc | |
parent | 6d167446d719a361d84bf6be752ad24d718eaa35 (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> |