X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FReport%2FFCC_477.pm;h=760f6f22daf5d16e1e03ed6dff969cc09365d7bf;hp=75ddee0d7c5c6cb12a72f132c30c710f4f7e4345;hb=b0888dc8399fc4e8d75c874c00d01366eacf5596;hpb=e11f3188435b30c193fd1443913ed77953e14dea diff --git a/FS/FS/Report/FCC_477.pm b/FS/FS/Report/FCC_477.pm index 75ddee0d7..760f6f22d 100644 --- a/FS/FS/Report/FCC_477.pm +++ b/FS/FS/Report/FCC_477.pm @@ -365,10 +365,12 @@ sub fbd_sql { 'adv_speed_down', 'adv_speed_up', 'CASE WHEN is_business IS NOT NULL THEN 1 ELSE 0 END', - 'cir_speed_down', - 'cir_speed_up', ); - push @select, 'blocknum' if $opt{detail}; + push @select, 'cir_speed_down', 'cir_speed_up' + if $opt{date} < 1569826800; #9/30/2019, halfway between the two filing + # "as of" dates when it changed + push @select, 'blocknum' + if $opt{detail}; my $from = 'deploy_zone_block JOIN deploy_zone USING (zonenum) @@ -382,7 +384,7 @@ sub fbd_sql { my $order_by = 'censusblock, agentnum, technology, is_consumer, is_business'; - "SELECT ".join(', ', @select) . " + "SELECT DISTINCT ".join(', ', @select) . " FROM $from WHERE ".join(' AND ', @where)." ORDER BY $order_by