diff options
author | mark <mark> | 2010-12-24 00:40:02 +0000 |
---|---|---|
committer | mark <mark> | 2010-12-24 00:40:02 +0000 |
commit | b1dacaef3f9773c72b4c6f525d2f1e584e1432fc (patch) | |
tree | bd08efca4434ac1e1fe5337fdb74da1a89a346c7 /httemplate/misc | |
parent | f73e85ca1d6603f0f3368412a5db66c10db12a3e (diff) |
manual batch approval and TD EFT fixes, RT#10545
Diffstat (limited to 'httemplate/misc')
-rw-r--r-- | httemplate/misc/download-batch.cgi | 4 | ||||
-rw-r--r-- | httemplate/misc/process/pay_batch-approve.cgi | 16 |
2 files changed, 17 insertions, 3 deletions
diff --git a/httemplate/misc/download-batch.cgi b/httemplate/misc/download-batch.cgi index 01bf5d25f..23deba712 100644 --- a/httemplate/misc/download-batch.cgi +++ b/httemplate/misc/download-batch.cgi @@ -1,6 +1,4 @@ -<% $pay_batch->export_batch($format) %> - -<%init> +<% $pay_batch->export_batch($format) %><%init> #http_header('Content-Type' => 'text/comma-separated-values' ); #IE chokes http_header('Content-Type' => 'text/plain' ); # not necessarily correct... diff --git a/httemplate/misc/process/pay_batch-approve.cgi b/httemplate/misc/process/pay_batch-approve.cgi new file mode 100644 index 000000000..f857e2318 --- /dev/null +++ b/httemplate/misc/process/pay_batch-approve.cgi @@ -0,0 +1,16 @@ +% if ( $error ) { +% $cgi->param('error', $error); +% } +<% $cgi->redirect(popurl(3)."search/cust_pay_batch.cgi?dcln=1;batchnum=$batchnum") %> +<%init> +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Process batches'); + +my $batchnum = $cgi->param('batchnum'); +# make a record in the paybatch of who did this +my $paybatch = 'manual-'.$FS::CurrentUser::CurrentUser->username. + '-' . time2str('%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time); +my $pay_batch = qsearchs('pay_batch', { 'batchnum' => $batchnum }) + or die "batchnum '$batchnum' not found"; +my $error = $pay_batch->manual_approve('paybatch' => $paybatch); +</%init> |