[freeside-commits] branch FREESIDE_3_BRANCH updated. 7b8350fe734d659d61c870128e98161ce4ba4449
Christopher Burger
burgerc at freeside.biz
Tue Aug 7 03:38:26 PDT 2018
The branch, FREESIDE_3_BRANCH has been updated
via 7b8350fe734d659d61c870128e98161ce4ba4449 (commit)
from 3da875870fc86799f4d1c5990260840e44337590 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7b8350fe734d659d61c870128e98161ce4ba4449
Author: Christopher Burger <burgerc at freeside.biz>
Date: Mon Aug 6 20:06:04 2018 -0400
RT# 77160 - updated date selection sql to make sure last cancel date falls with in range
diff --git a/httemplate/search/cust_timespan.html b/httemplate/search/cust_timespan.html
index 53ee66d42..254891cec 100644
--- a/httemplate/search/cust_timespan.html
+++ b/httemplate/search/cust_timespan.html
@@ -88,7 +88,8 @@ my $active_date = 'select min(setup) from cust_pkg left join part_pkg using (pkg
## set cancel date range here
my($beginning_date, $ending_date) = FS::UI::Web::parse_beginning_ending($cgi, '');
-my $cancel_date = 'select max(cancel) from cust_pkg left join part_pkg using (pkgpart) where cust_pkg.custnum = cust_main.custnum and part_pkg.freq > \'0\' and (cancel >= '.$beginning_date.' and cancel <= '.$ending_date.')';
+my $max_cancel_sql = "select max(cancel) from cust_pkg left join part_pkg using (pkgpart) where cust_pkg.custnum = cust_main.custnum and part_pkg.freq > \'0\'";
+my $cancel_date = $max_cancel_sql.' and (('.$max_cancel_sql.') >= '.$beginning_date.' and ('.$max_cancel_sql.') <= '.$ending_date.')';
my $cancel_reason = 'select reason.reason from cust_pkg
left join cust_pkg_reason on (cust_pkg.pkgnum = cust_pkg_reason.pkgnum)
-----------------------------------------------------------------------
Summary of changes:
httemplate/search/cust_timespan.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list