1 <% include('/elements/header.html', 'Edit tax rates with Excel' ) %>
3 % # 'name' => 'RateImportForm',
5 <& /elements/form-file_upload.html,
6 'name' => 'TaxEditForm',
7 'action' => 'process/tax_edit_excel.html',
9 'fields' => [ 'format' ],
10 'message' => 'Tax Rate edit successful',
11 'url' => $p."browse/cust_main_county.cgi",
12 'onsubmit' => "document.TaxEditForm.submitButton.disabled=true;"
15 <% &ntable("#cccccc", 2) %>
18 <TD ALIGN="left" COLSPAN=2>File format should be as follows:<BR>
20 <TR><TD><B>Country</B> as standard two letter code</TD></TR>
21 <TR><TD><B>State</B> as standard two letter code</TD></TR>
22 <TR><TD><B>County name</B></TD></TR>
23 <TR><TD><B>City name</B></TD></TR>
24 <TR><TD><B>Tax name</B></TD></TR>
25 <TR><TD><B>Tax rate</B></TD></TR>
27 * first row should be blank or contain headers<BR>
28 * Tax rate should be formated as a number not percentage.
33 <TH ALIGN="left" COLSPAN=2>Upload tax rates with Excel (or other .XLS-compatible application)</TH>
37 <% include( '/elements/file-upload.html',
40 'label_align' => 'left',
44 <INPUT TYPE="hidden" NAME="format" VALUE="default">
47 <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
48 <INPUT TYPE = "submit"
59 <% include('/elements/footer.html') %>
63 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
65 my $sth = dbh->prepare('SELECT COUNT(*) FROM rate_detail WHERE conn_charge > 0 OR conn_sec > 0 LIMIT 1')
67 $sth->execute or die $sth->errstr;
68 my $have_conn = $sth->fetchrow_arrayref->[0];