diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-04-26 17:35:14 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-04-26 17:35:14 -0700 |
commit | 2a7f90bbc8958c0674bb470ecd8e4bed00e6a8c4 (patch) | |
tree | e855867f9cfdf6028a27472de24ab0cd7dab7b07 /httemplate/misc/xmlhttp-cust_bill-search.html | |
parent | 4f94568dd0bc4c857441ec531e2c936fefa78635 (diff) | |
parent | 6ff1c755b054201c38b0a2a7b6161325af5c0bcf (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/misc/xmlhttp-cust_bill-search.html')
-rw-r--r-- | httemplate/misc/xmlhttp-cust_bill-search.html | 18 |
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> |