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', '_date', '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 %>"%>
21 <& /elements/tr-input-date-field.html, {
30 <TH ALIGN="right">Format</TH>
32 <SELECT NAME="format">
33 <OPTION VALUE="simple">Simple
38 <INPUT TYPE="hidden" NAME="format" VALUE="simple">
40 <% include( '/elements/file-upload.html',
42 'label' => 'Filename',
47 <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
48 <INPUT TYPE = "submit"
62 Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension.
65 <b>Default</b> format has the following field order: <i>custnum, amount, reasonnum, invnum</i><br>
70 <li><i>custnum</i>: Customer number
72 <li><i>reasonnum</i>: <A HREF="<%$p%>browse/reason_type.html?class=R">Credit reason</A>
73 <li><i>invnum</i>: Invoice number
77 <% include('/elements/footer.html') %>
82 unless $FS::CurrentUser::CurrentUser->access_right('Import');
84 my $credbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);