1 <& /elements/header.html, 'Batch Credit Import' &>
3 Import a file containing credits.
6 <& /elements/form-file_upload.html,
7 'name' => 'CreditImportForm',
8 'action' => 'process/cust_credit-import.cgi',
10 'fields' => [ 'format', 'credbatch' ],
11 'message' => 'Credit import successful',
12 'url' => $p."search/cust_credit.html?credbatch=$credbatch",
13 'onsubmit' => "document.CreditImportForm.submitButton.disabled=true;",
17 <% &ntable("#cccccc", 2) %>
19 <INPUT TYPE="hidden" NAME="credbatch" VALUE="<% $credbatch %>"%>
23 <TH ALIGN="right">Format</TH>
25 <SELECT NAME="format">
26 <OPTION VALUE="simple">Simple
31 <INPUT TYPE="hidden" NAME="format" VALUE="simple">
33 <% include( '/elements/file-upload.html',
35 'label' => 'Filename',
40 <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
41 <INPUT TYPE = "submit"
55 Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension.
58 <b>Default</b> format has the following field order: <i>custnum, amount, reasonnum, invnum</i><br>
63 <li><i>custnum</i>: Customer number
65 <li><i>reasonnum</i>: <A HREF="<%$p%>browse/reason.html?class=R">Credit reason</A>
66 <li><i>invnum</i>: Invoice number
70 <% include('/elements/footer.html') %>
75 unless $FS::CurrentUser::CurrentUser->access_right('Import');
77 my $credbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);