summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-09-18 10:18:16 -0700
committerMark Wells <mark@freeside.biz>2015-09-18 10:18:16 -0700
commit7bce756e86a4307d6cad49a690f22a321acc9981 (patch)
treeda3856bed3fcffe6da27e346592663a5a463eeb1 /httemplate
parent5aafaf2e4efe3a7b57ec9afd563ced32e70b581f (diff)
parent7ee96ef046f8e5167a4dda7c4322485549ec29c3 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/process/rate_detail.html1
-rw-r--r--httemplate/elements/select-tower_sector.html1
-rw-r--r--httemplate/view/cust_main/billing.html11
3 files changed, 12 insertions, 1 deletions
diff --git a/httemplate/edit/process/rate_detail.html b/httemplate/edit/process/rate_detail.html
index 0709d5079..f8a744418 100644
--- a/httemplate/edit/process/rate_detail.html
+++ b/httemplate/edit/process/rate_detail.html
@@ -12,7 +12,6 @@ die "access denied"
my $set_default_detail = sub {
my ($cgi, $rate_detail) = @_;
-warn Dumper $rate_detail;
if (!$rate_detail->dest_regionnum) {
# then this is a global default rate
my $rate = $rate_detail->rate;
diff --git a/httemplate/elements/select-tower_sector.html b/httemplate/elements/select-tower_sector.html
index 59b016359..458bcddcf 100644
--- a/httemplate/elements/select-tower_sector.html
+++ b/httemplate/elements/select-tower_sector.html
@@ -11,6 +11,7 @@
<& /elements/select-table.html,
table => 'tower',
name_col => 'towername',
+ hashref => { 'disabled' => '', },
id => 'towernum',
field => 'towernum',
onchange => 'change_towernum(this.value);',
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html
index c031ce929..f7ea68a65 100644
--- a/httemplate/view/cust_main/billing.html
+++ b/httemplate/view/cust_main/billing.html
@@ -44,11 +44,13 @@
% '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
% }) or next;
%
% my $freq_pretty = $cust_pkg[0]->part_pkg->freq_pretty;
%
% my $amount = 0;
+% my $skip_pkg = {};
% foreach my $cust_pkg (@cust_pkg) {
% my $part_pkg = $cust_pkg->part_pkg;
% next if $cust_pkg->susp
@@ -57,6 +59,15 @@
% || $cust_pkg->option('no_suspend_bill')
% );
%
+% #pkg change handling
+% next if $skip_pkg->{$cust_pkg->pkgnum};
+% if ($cust_pkg->change_to_pkgnum) {
+% #if change is on or before next bill date, use new pkg
+% next if $cust_pkg->expire <= $cust_pkg->bill;
+% #if change is after next bill date, use old (this) pkg
+% $skip_pkg->{$cust_pkg->change_to_pkgnum} = 1;
+% }
+%
% my $pkg_amount = 0;
%
% #add recurring amounts for this package and its billing add-ons