From 64a2c644f1cb10cf1c37ef1941dc3406f21d94ed Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Wed, 16 Sep 2015 01:59:07 -0500 Subject: RT#36813: Monthly Recurring Total [change_to_pkgnum handling] --- httemplate/view/cust_main/billing.html | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'httemplate') 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 -- cgit v1.2.1 From 0f3af066f679296c0f4c563f6f8a850072f949f6 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Sat, 19 Sep 2015 19:36:55 -0500 Subject: RT#36813: Monthly Recurring Total [fixed order by] --- httemplate/view/cust_main/billing.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate') 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; -- cgit v1.2.1 From 1c51a226da8214c805733b6cac0f6ce74e11a0bb Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Thu, 17 Sep 2015 19:27:10 -0500 Subject: RT#35197: Apply changes button in Edit rate plan screen clears the global default --- httemplate/edit/process/rate_detail.html | 1 - 1 file changed, 1 deletion(-) (limited to 'httemplate') 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; -- cgit v1.2.1 From 7fc8d0203dc714bf6d320fed612833d513ba9f27 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Sat, 19 Sep 2015 18:11:54 -0500 Subject: RT#35197: Apply changes button in Edit rate plan screen clears the global default [removed preserve_rate_detail, always true] --- httemplate/edit/rate.cgi | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'httemplate') 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 @@
- - " onClick="document.OneTrueForm.submit.disabled=true; process();"> -- cgit v1.2.1