X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fpay_batch-approve.cgi;h=ff5f12b380c87c8e1db06644205646d7e3017b4b;hb=f8b35040badefb02652f875e147ee2b4b2f7c4a9;hp=f857e23188fb4031857d1f9c38f5414b8e141791;hpb=dc1891ff9a6e6c4b4545fe7f786af6bd0f28b2cf;p=freeside.git diff --git a/httemplate/misc/process/pay_batch-approve.cgi b/httemplate/misc/process/pay_batch-approve.cgi index f857e2318..ff5f12b38 100644 --- a/httemplate/misc/process/pay_batch-approve.cgi +++ b/httemplate/misc/process/pay_batch-approve.cgi @@ -7,10 +7,11 @@ 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 $paybatch = $batchnum; +my $usernum = $FS::CurrentUser::CurrentUser->usernum; my $pay_batch = qsearchs('pay_batch', { 'batchnum' => $batchnum }) or die "batchnum '$batchnum' not found"; -my $error = $pay_batch->manual_approve('paybatch' => $paybatch); +my $error = $pay_batch->manual_approve( + 'paybatch' => $paybatch, 'usernum' => $usernum +);