blob: 92b6e5a36036ba6d1da9514d69588867b995649e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<% $cgi->redirect(popurl(3). "search/cust_pay.html?magic=paybatch;paybatch=$paybatch") %>
<%init>
my $fh = $cgi->upload('csvfile');
# webbatch? I suppose
my $paybatch = time2str('webbatch-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
my $error = defined($fh)
? FS::cust_pay::batch_import( {
'filehandle' => $fh,
'agentnum' => scalar($cgi->param('agentnum')),
'format' => scalar($cgi->param('format')),
'paybatch' => $paybatch,
} )
: 'No file';
errorpage($error)
if ( $error );
</%init>
|