summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/batch-cust_pay.html15
-rwxr-xr-xhttemplate/misc/cancel_pkg.html2
-rw-r--r--httemplate/misc/phone_device_config.html57
-rwxr-xr-xhttemplate/misc/process/bulk_pkg_increment_bill.cgi76
-rw-r--r--httemplate/misc/process/tax-import.cgi2
-rw-r--r--httemplate/misc/tax-import.cgi23
6 files changed, 11 insertions, 164 deletions
diff --git a/httemplate/misc/batch-cust_pay.html b/httemplate/misc/batch-cust_pay.html
index 505f2d0ff..e10a5f658 100644
--- a/httemplate/misc/batch-cust_pay.html
+++ b/httemplate/misc/batch-cust_pay.html
@@ -2,20 +2,7 @@
<% include('/elements/error.html') %>
-<SCRIPT TYPE="text/javascript">
-function warnUnload() {
- if(document.getElementById("OneTrueTable").rows.length > 3 &&
- !document.OneTrueForm.submit.disabled) {
- return "The current batch will be lost.";
- }
- else {
- return null;
- }
-}
-window.onbeforeunload = warnUnload;
-</SCRIPT>
-
-<FORM ACTION="process/batch-cust_pay.cgi" NAME="OneTrueForm" METHOD="POST" onsubmit="document.OneTrueForm.submit.disabled=true;window.onbeforeunload = null;">
+<FORM ACTION="process/batch-cust_pay.cgi" NAME="OneTrueForm" METHOD="POST" onsubmit="document.OneTrueForm.submit.disabled=true;">
<!-- <B>Batch</B> <INPUT TYPE="text" NAME="paybatch"><BR><BR> -->
diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html
index 10c0e0d04..67d2847cc 100755
--- a/httemplate/misc/cancel_pkg.html
+++ b/httemplate/misc/cancel_pkg.html
@@ -58,7 +58,7 @@
<%init>
-my $conf = new FS::Conf;
+my %conf = new FS::Conf;
my $date_format = $conf->config('date_format') || '%m/%d/%Y';
my $date = time2str($date_format, time);
diff --git a/httemplate/misc/phone_device_config.html b/httemplate/misc/phone_device_config.html
deleted file mode 100644
index 9ea0d0d1c..000000000
--- a/httemplate/misc/phone_device_config.html
+++ /dev/null
@@ -1,57 +0,0 @@
-%if ($config) {
-<% $config %>
-%}else{
-<% include("/elements/errorpage.html", "No configuration data produced.") %>
-%}
-<%init>
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
-
-my $exportnum;
-if ( $cgi->param('exportnum') ) {
- $cgi->param('exportnum') =~ /^(\d+)$/ or die "unparsable exportnum";
- $exportnum = $1;
-}
-
-die "no export provided"
- unless $exportnum;
-
-my $svcnum;
-if ( $cgi->param('svcnum') ) {
- $cgi->param('svcnum') =~ /^(\d+)$/ or die "unparsable svcnum";
- $svcnum = $1;
-}
-
-my $devicenum;
-if ( $cgi->param('devicenum') ) {
- $cgi->param('devicenum') =~ /^(\d+)$/ or die "unparsable devicenum";
- $devicenum = $1;
-}
-
-die "no device or service provided"
- unless $svcnum || $devicenum;
-
-my $part_export = qsearchs('part_export', { 'exportnum' => $exportnum })
- or die "Unknown exportnum $exportnum\n";
-
-my $phone_device;
-my $svc_phone;
-if ($devicenum) {
- $phone_device = qsearchs('phone_device', { 'devicenum' => $devicenum })
- or die "Unknown device $devicenum\n";
- $svc_phone = $phone_device->svc_phone;
-} else {
- $svc_phone = qsearchs('svc_phone', { 'svcnum' => $svcnum })
- or die "Unknown svc_phone $svcnum\n";
-}
-
-my $config = $part_export->export_device_config($svc_phone, $phone_device);
-
-if ($config) {
- http_header('Content-Type' => 'application/octet-stream');
- http_header('Content-Disposition' => 'attachment;filename="config"');
- http_header('Content-Length' => length($config));
-}
-
-</%init>
diff --git a/httemplate/misc/process/bulk_pkg_increment_bill.cgi b/httemplate/misc/process/bulk_pkg_increment_bill.cgi
deleted file mode 100755
index 0d8417b26..000000000
--- a/httemplate/misc/process/bulk_pkg_increment_bill.cgi
+++ /dev/null
@@ -1,76 +0,0 @@
-%if ($error) {
-% $cgi->param('error', $error);
-<% $cgi->redirect(popurl(2). 'bulk_pkg_increment_bill.cgi?'. $cgi->query_string ) %>
-%} else {
-<% header('Packages Adjusted') %>
- <SCRIPT TYPE="text/javascript">
- window.top.location.reload();
- </SCRIPT>
- </BODY></HTML>
-% }
-<%init>
-
-local $FS::UID::AutoCommit = 0;
-my $dbh = dbh;
-my $error;
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages')
- and $FS::CurrentUser::CurrentUser->access_right('Edit customer package dates');
-
-my $days = $cgi->param('days') or die "missing parameter: days";
-$days > 0 or $error = "Number of days must be > 0";
-
-my %search_hash = ();
-
-$search_hash{'query'} = $cgi->param('query');
-
-for my $param (qw(agentnum magic status classnum pkgpart)) {
- $search_hash{$param} = $cgi->param($param)
- if $cgi->param($param);
-}
-
-###
-# parse dates
-###
-
-#false laziness w/report_cust_pkg.html
-# and, now, w/bulk_change_pkg.cgi
-my %disable = (
- 'all' => {},
- 'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, },
- 'active' => { 'susp'=>1, 'cancel'=>1 },
- 'suspended' => { 'cancel' => 1 },
- 'cancelled' => {},
- '' => {},
-);
-
-foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
-
- my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field);
-
- next if $beginning == 0 && $ending == 4294967295
- or $disable{$cgi->param('status')}->{$field};
-
- $search_hash{$field} = [ $beginning, $ending ];
-
-}
-
-if(!$error) {
- foreach my $cust_pkg (qsearch(FS::cust_pkg->search(\%search_hash))) {
- next if ! $cust_pkg->bill;
- my $new_cust_pkg = FS::cust_pkg->new({ $cust_pkg->hash });
- $new_cust_pkg->bill($new_cust_pkg->bill + $days*86400);
- $error = $new_cust_pkg->replace($cust_pkg);
-
- if($error) {
- $cgi->param("error",substr($error, 0, 512));
- $dbh->rollback;
- return;
- }
- }
-
- $dbh->commit;
-}
-
-</%init>
diff --git a/httemplate/misc/process/tax-import.cgi b/httemplate/misc/process/tax-import.cgi
index b9e9daad5..f800dbd5b 100644
--- a/httemplate/misc/process/tax-import.cgi
+++ b/httemplate/misc/process/tax-import.cgi
@@ -4,6 +4,6 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Import');
-my $server = new FS::UI::Web::JSRPC 'FS::tax_rate::process_batch_import', $cgi;
+my $server = new FS::UI::Web::JSRPC 'FS::tax_rate::process_batch_import', $cgi;
</%init>
diff --git a/httemplate/misc/tax-import.cgi b/httemplate/misc/tax-import.cgi
index ceb74645c..5116e5404 100644
--- a/httemplate/misc/tax-import.cgi
+++ b/httemplate/misc/tax-import.cgi
@@ -7,7 +7,7 @@ Import a CSV file set containing tax rate records.
'name' => 'TaxRateUpload',
'action' => 'process/tax-import.cgi',
'num_files' => 6,
- 'fields' => [ 'format', 'reload' ],
+ 'fields' => [ 'format', ],
'message' => 'Tax rates imported',
)
%>
@@ -18,28 +18,21 @@ Import a CSV file set containing tax rate records.
<TH ALIGN="right">Format</TH>
<TD>
<SELECT NAME="format">
- <!-- <OPTION VALUE="cch-update" SELECTED>CCH update (CSV) -->
- <OPTION VALUE="cch">CCH import (CSV)
- <!-- <OPTION VALUE="cch-fixed-update">CCH update (fixed length) -->
- <OPTION VALUE="cch-fixed">CCH import (fixed length)
+ <OPTION VALUE="cch-update" SELECTED>CCH update (CSV)
+ <OPTION VALUE="cch">CCH initial import (CSV)
+ <OPTION VALUE="cch-fixed-update">CCH update (fixed length)
+ <OPTION VALUE="cch-fixed">CCH initial import (fixed length)
</SELECT>
</TD>
</TR>
- <TR>
- <TH ALIGN="right">Replace existing data from this vendor</TH>
- <TD>
- <INPUT NAME="reload" TYPE="checkbox" VALUE="1" CHECKED>
- </TD>
- </TR>
-
<% include( '/elements/file-upload.html',
- 'field' => [ 'geocodefile',
+ 'field' => [ 'geofile',
'codefile',
'plus4file',
'zipfile',
- 'txmatrixfile',
- 'detailfile',
+ 'txmatrix',
+ 'detail',
],
'label' => [ 'geocode filename',
'code filename',