tweak, rearrange, and avoid the vacuum
[freeside.git] / httemplate / misc / tax-import.cgi
1 <% include("/elements/header.html",'Batch Tax Rate Import') %>
2
3 Import a CSV file set containing tax rate records.
4 <BR><BR>
5
6 <% include( '/elements/form-file_upload.html',
7               'name'      => 'TaxRateUpload',
8               'action'    => 'process/tax-import.cgi', 
9               'num_files' => 6,
10               'fields'    => [ 'format', 'reload' ],
11               'message'   => 'Tax rates imported',
12           )
13 %>
14
15 <% &ntable("#cccccc", 2) %>
16
17   <TR>
18     <TH ALIGN="right">Format</TH>
19     <TD>
20       <SELECT NAME="format">
21         <!-- <OPTION VALUE="cch-update" SELECTED>CCH update (CSV) -->
22         <OPTION VALUE="cch">CCH import (CSV)
23         <!-- <OPTION VALUE="cch-fixed-update">CCH update (fixed length) -->
24         <OPTION VALUE="cch-fixed">CCH import (fixed length)
25       </SELECT>
26     </TD>
27   </TR>
28
29   <TR>
30     <TH ALIGN="right">Replace existing data from this vendor</TH>
31     <TD>
32       <INPUT NAME="reload" TYPE="checkbox" VALUE="1" CHECKED>
33     </TD>
34   </TR>
35
36   <% include( '/elements/file-upload.html',
37                 'field'    => [ 'geocodefile',
38                                 'codefile',
39                                 'plus4file',
40                                 'zipfile',
41                                 'txmatrixfile',
42                                 'detailfile',
43                               ],
44                 'label'    => [ 'geocode filename',
45                                 'code filename',
46                                 'plus4 filename',
47                                 'zip filename',
48                                 'txmatrix filename',
49                                 'detail filename',
50                               ],
51                 'debug'    => 0,
52             )
53   %>
54
55   <TR>
56     <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
57       <INPUT TYPE    = "submit"
58              VALUE   = "Import CSV files"
59              onClick = "document.TaxRateUpload.submit.disabled=true;"
60       >
61     </TD>
62   </TR>
63
64 </TABLE>
65
66 </FORM>
67
68 <% include('/elements/footer.html') %>
69 <%init>
70
71 die "access denied"
72   unless $FS::CurrentUser::CurrentUser->access_right('Import');
73
74 </%init>