[freeside-commits] branch FREESIDE_3_BRANCH updated. 7cd31cde35c69800b9ff8584f661c06cfc6101e2
Mark Wells
mark at 420.am
Thu Dec 4 12:59:06 PST 2014
The branch, FREESIDE_3_BRANCH has been updated
via 7cd31cde35c69800b9ff8584f661c06cfc6101e2 (commit)
from b4ffac18a7114aad76ef9bc8597c2983a33396ec (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 7cd31cde35c69800b9ff8584f661c06cfc6101e2
Author: Mark Wells <mark at freeside.biz>
Date: Thu Dec 4 12:58:30 2014 -0800
fix census tract format, #32499, etc.
diff --git a/FS/FS/Report/FCC_477.pm b/FS/FS/Report/FCC_477.pm
index f5d6a06..20d402d 100644
--- a/FS/FS/Report/FCC_477.pm
+++ b/FS/FS/Report/FCC_477.pm
@@ -355,8 +355,10 @@ sub fbs_sql {
my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
+ my $censustract = "replace(cust_location.censustract, '.', '')";
+
my @select = (
- 'cust_location.censustract',
+ "$censustract AS censustract",
'technology',
'broadband_downstream',
'broadband_upstream',
@@ -381,8 +383,7 @@ sub fbs_sql {
is_fixed_broadband()
);
push @where, "cust_main.agentnum = $agentnum" if $agentnum;
- my $group_by = 'cust_location.censustract, technology, '.
- 'broadband_downstream, broadband_upstream ';
+ my $group_by = "$censustract, technology, broadband_downstream, broadband_upstream ";
my $order_by = $group_by;
"SELECT ".join(', ', @select) . "
@@ -400,9 +401,10 @@ sub fvs_sql {
my $date = $opt{date} || time;
my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
+ my $censustract = "replace(cust_location.censustract, '.', '')";
my @select = (
- 'cust_location.censustract',
+ "$censustract AS censustract",
# VoIP indicator (0 for non-VoIP, 1 for VoIP)
'COALESCE(is_voip, 0)',
# number of lines/subscriptions
@@ -426,7 +428,7 @@ sub fvs_sql {
"(is_voip = 1 OR is_phone = 1)",
);
push @where, "cust_main.agentnum = $agentnum" if $agentnum;
- my $group_by = 'cust_location.censustract, COALESCE(is_voip, 0)';
+ my $group_by = "$censustract, COALESCE(is_voip, 0)";
my $order_by = $group_by;
"SELECT ".join(', ', @select) . "
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Report/FCC_477.pm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list