summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-xhttemplate/misc/cancel_pkg.html2
-rw-r--r--httemplate/misc/delete-mailinglistmember.html20
-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/copy-rate_detail.html2
-rw-r--r--httemplate/misc/process/tax-import.cgi2
-rw-r--r--httemplate/misc/rate_edit_excel.html9
-rw-r--r--httemplate/misc/tax-import.cgi23
8 files changed, 40 insertions, 151 deletions
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/delete-mailinglistmember.html b/httemplate/misc/delete-mailinglistmember.html
new file mode 100644
index 000000000..6b91de807
--- /dev/null
+++ b/httemplate/misc/delete-mailinglistmember.html
@@ -0,0 +1,20 @@
+% if ( $error ) {
+% errorpage($error);
+% } else {
+<% $cgi->redirect($p."search/mailinglistmember.html?listnum=$listnum") %>
+% }
+<%init>
+
+my($query) = $cgi->keywords;
+$query =~ /^(\d+)$/ || die "Illegal devicenum";
+my $membernum = $1;
+
+my $mailinglistmember =
+ qsearchs('mailinglistmember', { 'membernum' => $membernum } )
+ or die "unknown membernum $membernum";
+
+my $listnum = $mailinglistmember->listnum;
+
+my $error = $mailinglistmember->delete;
+
+</%init>
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/copy-rate_detail.html b/httemplate/misc/process/copy-rate_detail.html
index 87a674566..60b2aebee 100644
--- a/httemplate/misc/process/copy-rate_detail.html
+++ b/httemplate/misc/process/copy-rate_detail.html
@@ -47,7 +47,7 @@ foreach my $countrycode ( @countrycodes ) {
|| new FS::rate_detail \%hash;
$dst_rate_detail->$_( $src_rate_detail->get($_) )
- foreach qw( min_included min_charge sec_granularity classnum );
+ foreach qw( min_included conn_charge conn_sec min_charge sec_granularity classnum );
my $method = $dst_rate_detail->ratedetailnum ? 'replace' : 'insert';
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/rate_edit_excel.html b/httemplate/misc/rate_edit_excel.html
index e73133c05..442d83aca 100644
--- a/httemplate/misc/rate_edit_excel.html
+++ b/httemplate/misc/rate_edit_excel.html
@@ -1,5 +1,9 @@
<% include('/elements/header.html', 'Edit rates with Excel' ) %>
+% if ( $have_conn ) {
+ <FONT COLOR="#FF0000">WARNING: This functionality does not yet preserve connection charges.</FONT><BR><BR>
+% }
+
<% include( '/elements/form-file_upload.html',
'name' => 'RateImportForm',
'action' => 'process/rate_edit_excel.html',
@@ -58,4 +62,9 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+my $sth = dbh->prepare('SELECT COUNT(*) FROM rate_detail WHERE conn_charge > 0 OR conn_sec > 0 LIMIT 1')
+ or die dbh->errstr;
+$sth->execute or die $sth->errstr;
+my $have_conn = $sth->fetchrow_arrayref->[0];
+
</%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',