summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-xhttemplate/misc/bulk_pkg_increment_bill.cgi50
-rwxr-xr-xhttemplate/misc/cancel_pkg.html7
-rwxr-xr-xhttemplate/misc/delay_susp_pkg.html7
-rw-r--r--httemplate/misc/delete-mailinglistmember.html20
-rw-r--r--httemplate/misc/order_pkg.html3
-rw-r--r--httemplate/misc/process/copy-rate_detail.html2
-rw-r--r--httemplate/misc/rate_edit_excel.html9
7 files changed, 92 insertions, 6 deletions
diff --git a/httemplate/misc/bulk_pkg_increment_bill.cgi b/httemplate/misc/bulk_pkg_increment_bill.cgi
new file mode 100755
index 000000000..d594b558a
--- /dev/null
+++ b/httemplate/misc/bulk_pkg_increment_bill.cgi
@@ -0,0 +1,50 @@
+<% include('/elements/header-popup.html', "Increment Next Bill Date") %>
+
+% if ( $cgi->param('error') ) {
+ <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
+ <BR><BR>
+% }
+
+<FORM ACTION="<% $p %>misc/process/bulk_pkg_increment_bill.cgi" METHOD=POST>
+
+%# some false laziness w/search/cust_pkg.cgi
+
+<INPUT TYPE="hidden" NAME="query" VALUE="<% $cgi->keywords |h %>">
+% for my $param (qw(agentnum custnum magic status classnum custom censustract)) {
+<INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) |h %>">
+% }
+%
+% foreach my $pkgpart ($cgi->param('pkgpart')) {
+<INPUT TYPE="hidden" NAME="pkgpart" VALUE="<% $pkgpart |h %>">
+% }
+%
+% foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
+%
+ <INPUT TYPE="hidden" NAME="<% $field %>begin" VALUE="<% $cgi->param("${field}.begin") |h %>">
+ <INPUT TYPE="hidden" NAME="<% $field %>beginning" VALUE="<% $cgi->param("${field}beginning") |h %>">
+ <INPUT TYPE="hidden" NAME="<% $field %>end" VALUE="<% $cgi->param("${field}.end") |h %>">
+ <INPUT TYPE="hidden" NAME="<% $field %>ending" VALUE="<% $cgi->param("${field}.ending") |h %>">
+% }
+
+<% ntable('#cccccc') %>
+
+ <TR>
+ <TD>Days to increment: </TD>
+ <TD><INPUT type="text" name="days"></TD>
+ </TR>
+
+</TABLE>
+
+<BR>
+<INPUT TYPE="submit" VALUE="Increment next bill date">
+
+</FORM>
+</BODY>
+</HTML>
+
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages');
+
+</%init>
diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html
index 607ce13c4..67d2847cc 100755
--- a/httemplate/misc/cancel_pkg.html
+++ b/httemplate/misc/cancel_pkg.html
@@ -31,7 +31,7 @@
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "expire_date",
- ifFormat: "%m/%d/%Y",
+ ifFormat: "<% $date_format %>",
button: "expire_button",
align: "BR"
});
@@ -58,7 +58,10 @@
<%init>
-my $date = time2str("%m/%d/%Y", time);
+my %conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+
+my $date = time2str($date_format, time);
my($pkgnum, $reasonnum);
if ( $cgi->param('error') ) {
diff --git a/httemplate/misc/delay_susp_pkg.html b/httemplate/misc/delay_susp_pkg.html
index d4a6da18f..8adc40d55 100755
--- a/httemplate/misc/delay_susp_pkg.html
+++ b/httemplate/misc/delay_susp_pkg.html
@@ -25,7 +25,7 @@
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "dun_date",
- ifFormat: "%m/%d/%Y",
+ ifFormat: "<% $date_format %>",
button: "dun_button",
align: "BR"
});
@@ -42,7 +42,10 @@
<%init>
-my $date = time2str("%m/%d/%Y", time);
+my $conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+
+my $date = time2str($date_format, time);
my($pkgnum);
if ( $cgi->param('error') ) {
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/order_pkg.html b/httemplate/misc/order_pkg.html
index a7571ca58..85573e6b4 100644
--- a/httemplate/misc/order_pkg.html
+++ b/httemplate/misc/order_pkg.html
@@ -54,7 +54,7 @@
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "start_date_text",
- ifFormat: "%m/%d/%Y",
+ ifFormat: "<% $date_format %>",
button: "start_date_button",
align: "BR"
});
@@ -90,6 +90,7 @@ die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Order customer package');
my $conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
$cgi->param('custnum') =~ /^(\d+)$/ or die "no custnum";
my $custnum = $1;
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/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>