1 <% include('/elements/header.html', 'Edit rates with Excel' ) %>
4 <FONT COLOR="#FF0000">WARNING: This functionality does not yet preserve connection charges.</FONT><BR><BR>
7 <& /elements/form-file_upload.html,
8 'name' => 'RateImportForm',
9 'action' => 'process/rate_edit_excel.html',
11 'fields' => [ 'format' ],
12 'message' => 'Rate edit successful',
13 'url' => $p."browse/rate_region.html",
14 'onsubmit' => "document.RateImportForm.submitButton.disabled=true;"
17 <% &ntable("#cccccc", 2) %>
20 <TH ALIGN="left">1. Download current rates:</TH>
22 <A HREF="<%$p%>/browse/rate_region.html?show_rates=1;_type=regions.xls">Download rate spreadsheet</A>
27 <TH ALIGN="left" COLSPAN=2>2. Edit rates with Excel (or other .XLS-compatible application)</TH>
31 <TD ALIGN="left" COLSPAN=2>
32 - To add rates, add four columns like an existing rate, with headers starting with "NEW: Rate Name" or "Rate Name".<BR>
33 - <FONT SIZE="-2"><I>For rate addition, protection can be turned off in Excel via the Tools->Protection->Unprotect Sheet menu command. Note that only new rates can be added; modified grayed out cells will not be imported.</I></FONT>
37 <% include( '/elements/file-upload.html',
39 'label' => '3. Upload edited rate file: ',
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];