disable quotations, RT#20688, RT#22232
[freeside.git] / httemplate / misc / cust_credit-import.html
1 <& /elements/header.html, 'Batch Credit Import' &>
2
3 Import a file containing credits.
4 <BR><BR>
5
6 <& /elements/form-file_upload.html,
7      'name'      => 'CreditImportForm',
8      'action'    => 'process/cust_credit-import.cgi',
9      'num_files' => 1,
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;",
14 &>
15
16
17 <% &ntable("#cccccc", 2) %>
18
19   <INPUT TYPE="hidden" NAME="credbatch" VALUE="<% $credbatch %>"%>
20
21   <& /elements/tr-input-date-field.html, {
22        'name'  => '_date',
23        #'value' => '',
24        'label' => 'Date',
25      }
26   &>
27
28   <!--
29   <TR>
30     <TH ALIGN="right">Format</TH>
31     <TD>
32       <SELECT NAME="format">
33         <OPTION VALUE="simple">Simple
34       </SELECT>
35     </TD>
36   </TR>
37   -->
38   <INPUT TYPE="hidden" NAME="format" VALUE="simple">
39
40   <% include( '/elements/file-upload.html',
41                 'field' => 'file',
42                 'label' => 'Filename',
43             )
44   %>
45
46   <TR>
47     <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
48       <INPUT TYPE    = "submit"
49              ID      = "submitButton"
50              NAME    = "submitButton"
51              VALUE   = "Import file"
52       >
53     </TD>
54   </TR>
55
56 </TABLE>
57
58 </FORM>
59
60 <BR>
61
62 Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets.  The file should have a .CSV or .XLS extension.
63 <BR><BR>
64
65     <b>Default</b> format has the following field order: <i>custnum, amount, reasonnum, invnum</i><br>
66 <BR><BR>
67
68 Field information:
69 <ul>
70   <li><i>custnum</i>: Customer number
71   <li><i>amount</i>:
72   <li><i>reasonnum</i>: <A HREF="<%$p%>browse/reason.html?class=R">Credit reason</A>
73   <li><i>invnum</i>: Invoice number
74 </ul>
75 <BR><BR>
76
77 <% include('/elements/footer.html') %>
78
79 <%init>
80
81 die "access denied"
82   unless $FS::CurrentUser::CurrentUser->access_right('Import');
83
84 my $credbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
85
86 </%init>