summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-09-20 10:01:21 -1000
committerMark Wells <mark@freeside.biz>2015-09-20 10:01:21 -1000
commitb8db5448d5c473ddf888cb9da7fc8dd5de703756 (patch)
treebee2168d2f3ed3dd146cb6758f9e14875c3706cd
parentb38fc0b849b21ed4e2a83bab885b63223914edd5 (diff)
parent1f688eba76414dfb81882d3ac800a6710312202a (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
-rw-r--r--FS/FS/rate.pm7
-rw-r--r--httemplate/edit/rate.cgi4
-rw-r--r--httemplate/elements/select-tower_sector.html2
-rw-r--r--httemplate/view/cust_main/billing.html2
4 files changed, 6 insertions, 9 deletions
diff --git a/FS/FS/rate.pm b/FS/FS/rate.pm
index 03dde041b..d26d11697 100644
--- a/FS/FS/rate.pm
+++ b/FS/FS/rate.pm
@@ -469,11 +469,8 @@ sub process {
warn "$rate replacing $old (". $param->{'ratenum'}. ")\n" if $DEBUG;
my @param = ( 'job'=>$job );
- if ($param->{'preserve_rate_detail'}) {
- $rate->default_detailnum($old->default_detailnum);
- } else {
- push @param, 'rate_detail'=>\@rate_detail;
- }
+
+ $rate->default_detailnum($old->default_detailnum);
$error = $rate->replace( $old, @param );
diff --git a/httemplate/edit/rate.cgi b/httemplate/edit/rate.cgi
index 183ea8a42..1b052d62d 100644
--- a/httemplate/edit/rate.cgi
+++ b/httemplate/edit/rate.cgi
@@ -5,7 +5,7 @@
<% include('/elements/progress-init.html',
'OneTrueForm',
- [ 'rate', 'agentnum', 'preserve_rate_detail' ], # 'rate', 'min_', 'sec_' ],
+ [ 'rate', 'agentnum' ],
'process/rate.cgi',
$p.'browse/rate.cgi',
)
@@ -27,8 +27,6 @@
</TABLE>
<BR>
-<INPUT TYPE="hidden" NAME="preserve_rate_detail" VALUE="1">
-
<INPUT NAME="submit" TYPE="button" VALUE="<%
$rate->ratenum ? "Apply changes" : "Add rate plan"
%>" onClick="document.OneTrueForm.submit.disabled=true; process();">
diff --git a/httemplate/elements/select-tower_sector.html b/httemplate/elements/select-tower_sector.html
index 458bcddcf..76ff25223 100644
--- a/httemplate/elements/select-tower_sector.html
+++ b/httemplate/elements/select-tower_sector.html
@@ -2,6 +2,8 @@
<& /elements/select-table.html,
table => 'tower_sector',
name_col => 'description',
+ addl_from => 'JOIN tower USING (towernum)',
+ extra_sql => q(WHERE disabled = '' OR disabled IS NULL),
order_by => 'ORDER BY towernum,sectorname',
empty_label => ' ',
@_
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html
index f7ea68a65..0c9f74a7c 100644
--- a/httemplate/view/cust_main/billing.html
+++ b/httemplate/view/cust_main/billing.html
@@ -44,7 +44,7 @@
% 'hashref' => { 'custnum' => $cust_main->custnum, },
% 'extra_sql' => 'AND ( cancel IS NULL OR cancel = 0 )
% AND freq = '. dbh->quote($freq),
-% 'order_by' => 'ORDER BY pkgnum', # to ensure old pkgs come before change_to_pkg
+% 'order_by' => 'ORDER BY COALESCE(start_date,0), pkgnum', # to ensure old pkgs come before change_to_pkg
% }) or next;
%
% my $freq_pretty = $cust_pkg[0]->part_pkg->freq_pretty;