[freeside-commits] branch FREESIDE_4_BRANCH updated. 9dfb97b6fb41274ac7990f092365657cb98fa007
Christopher Burger
burgerc at freeside.biz
Mon Aug 6 17:10:57 PDT 2018
The branch, FREESIDE_4_BRANCH has been updated
via 9dfb97b6fb41274ac7990f092365657cb98fa007 (commit)
via 771e93f4139a07e2324797f2b3a2f5bd1dc57aa5 (commit)
from 8c3b59c96ccd10592fb3d176ae1ad54c30b553df (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 9dfb97b6fb41274ac7990f092365657cb98fa007
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 a511a30a5..9c9a8261c 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)
commit 771e93f4139a07e2324797f2b3a2f5bd1dc57aa5
Author: Christopher Burger <burgerc at freeside.biz>
Date: Mon Aug 6 16:21:47 2018 -0400
RT# 77160 - fixed sql when joing cust_location
diff --git a/httemplate/search/cust_timespan.html b/httemplate/search/cust_timespan.html
index f95250a44..a511a30a5 100644
--- a/httemplate/search/cust_timespan.html
+++ b/httemplate/search/cust_timespan.html
@@ -101,8 +101,6 @@ my @fields = ( 'custnum', 'custname', $location_sub, 'daytime', $email_sub, 'act
my @links = ( $customer_link, $customer_link, '', '', '', '', '', '', '' );
my @select = (
'cust_main.*',
- 'cust_location.*',
- 'part_pkg.*',
"(select to_char((select to_timestamp((".$active_date."))), 'Mon DD YYYY')) AS active_date",
"(select to_char((select to_timestamp((".$cancel_date."))), 'Mon DD YYYY')) AS cancel_date",
"($cancel_reason) AS cancel_reason",
-----------------------------------------------------------------------
Summary of changes:
httemplate/search/cust_timespan.html | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list