diff options
| author | jeff <jeff> | 2008-01-25 18:26:06 +0000 |
|---|---|---|
| committer | jeff <jeff> | 2008-01-25 18:26:06 +0000 |
| commit | 4d30f1a0f1ae7759ead8e7475bfbbb75eb4c9a8b (patch) | |
| tree | a9ca55192a15e49083cee74cf91da89babaad078 /httemplate/misc/process/cust_pay-import.cgi | |
| parent | 8093c2feb63bac5c751d8157b7751d7ac3678a04 (diff) | |
simple payment CSV import
Diffstat (limited to 'httemplate/misc/process/cust_pay-import.cgi')
| -rw-r--r-- | httemplate/misc/process/cust_pay-import.cgi | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/httemplate/misc/process/cust_pay-import.cgi b/httemplate/misc/process/cust_pay-import.cgi new file mode 100644 index 000000000..d4ff226ec --- /dev/null +++ b/httemplate/misc/process/cust_pay-import.cgi @@ -0,0 +1,21 @@ +<% $cgi->redirect(popurl(3). "search/cust_pay.cgi?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> |
