<& /elements/header.html, 'Batch Credit Import' &> Import a file containing credits.

<& /elements/form-file_upload.html, 'name' => 'CreditImportForm', 'action' => 'process/cust_credit-import.cgi', 'num_files' => 1, 'fields' => [ 'format', '_date', 'credbatch' ], 'message' => 'Credit import successful', 'url' => $p."search/cust_credit.html?credbatch=$credbatch", 'onsubmit' => "document.CreditImportForm.submitButton.disabled=true;", &> <% &ntable("#cccccc", 2) %> <& /elements/tr-input-date-field.html, { 'name' => '_date', #'value' => '', 'label' => 'Date', } &> <% include( '/elements/file-upload.html', 'field' => 'file', 'label' => 'Filename', ) %>
Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension.

Default format has the following field order: custnum, amount, reasonnum, invnum, agent_custid


Field information:

<% include('/elements/footer.html') %> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Import'); my $credbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);