summaryrefslogtreecommitdiff
path: root/httemplate/misc/process
diff options
context:
space:
mode:
authormark <mark>2010-12-24 00:41:26 +0000
committermark <mark>2010-12-24 00:41:26 +0000
commit9aec8fd2e02ffc6bd02fe5c6de373abd68011c4a (patch)
tree2560f7f0868a52f90baf27c64a27ab2d0d39d997 /httemplate/misc/process
parent9958556555ea7af329e6602937c1fa9d2483ddf4 (diff)
manual batch approval and TD EFT fixes, RT#10545
Diffstat (limited to 'httemplate/misc/process')
-rw-r--r--httemplate/misc/process/pay_batch-approve.cgi16
1 files changed, 16 insertions, 0 deletions
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>