summaryrefslogtreecommitdiff
path: root/httemplate/misc/xmlhttp-cust_bill-search.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-04-23 20:27:17 -0700
committerMark Wells <mark@freeside.biz>2012-04-23 20:27:17 -0700
commit43e6b2ea06434abead940939c9b04e00e3a72f32 (patch)
treec52854f1b28f35a9d7752205b6d811b61c038d3f /httemplate/misc/xmlhttp-cust_bill-search.html
parentaa028b1f28a468df2a3d3a5ff03a856bba2c1254 (diff)
manual control of quick payment application, #15861
Diffstat (limited to 'httemplate/misc/xmlhttp-cust_bill-search.html')
-rw-r--r--httemplate/misc/xmlhttp-cust_bill-search.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/httemplate/misc/xmlhttp-cust_bill-search.html b/httemplate/misc/xmlhttp-cust_bill-search.html
new file mode 100644
index 000000000..46f15d1ab
--- /dev/null
+++ b/httemplate/misc/xmlhttp-cust_bill-search.html
@@ -0,0 +1,18 @@
+<% encode_json(\@return) %>
+<%init>
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+die 'access denied' unless $curuser->access_right('View invoices');
+my @return;
+if ( $cgi->param('sub') eq 'custnum_search_open' ) {
+ my $custnum = $cgi->param('arg');
+ #warn "searching invoices for $custnum\n";
+ my $cust_main = FS::cust_main->by_key($custnum);
+ @return = map {
+ +{ $_->hash,
+ 'owed' => $_->owed }
+ } $cust_main->open_cust_bill
+ if $curuser->agentnums_href->{ $cust_main->agentnum };
+}
+
+</%init>