summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2022-03-03 18:35:57 -0800
committerIvan Kohler <ivan@freeside.biz>2022-03-03 18:35:57 -0800
commitd3fd8a3434654a24d7022bdb7333dcebdd901578 (patch)
tree1feea7268fe776aa8ef8fe701a0491f39971db27
parent2feb18cd007cae05580dc53c61d5cb640582e1c6 (diff)
Revert "update warnings re: census tract length so real errors are easier to spot, RT#86245"
This reverts commit 925c59ada6a80ad6c8c78ff5f560f74c230f195b.
-rw-r--r--FS/FS/Report/FCC_477.pm23
1 files changed, 5 insertions, 18 deletions
diff --git a/FS/FS/Report/FCC_477.pm b/FS/FS/Report/FCC_477.pm
index 29505f8..760f6f2 100644
--- a/FS/FS/Report/FCC_477.pm
+++ b/FS/FS/Report/FCC_477.pm
@@ -320,7 +320,7 @@ sub report {
my $num_errors = 0;
foreach my $row (@$data) {
if ( $class->can($check_method) ) { # they don't all have these
- my $eh = $class->$check_method( $row, 'date'=>$opt{'date'} );
+ my $eh = $class->$check_method( $row );
$num_errors++ if keys(%$eh);
push @$error, $eh
}
@@ -442,19 +442,12 @@ sub fbs_sql {
sub fbs_check {
my $class = shift;
my $row = shift;
-
- my %opt = @_;
- my $date = $opt{date} || time;
- my $census_digits = ($date < 1601449200) ? 11 : 15; # 9/30/2020, halfway
- # between the two filing
- # dates when it changed
-
my %e;
#censustract
if ( length($row->[0]) == 0 ) {
$e{'censustract_null'} = 'The package location has no census tract.';
- } elsif ($row->[0] !~ /^\d{$census_digits}$/) {
- $e{'censustract_bad'} = "The census tract must be exactly $census_digits digits.";
+ } elsif ($row->[0] !~ /^\d{11}$/) {
+ $e{'censustract_bad'} = 'The census tract must be exactly 11 digits.';
}
#technology
@@ -522,18 +515,12 @@ sub fvs_sql {
sub fvs_check {
my $class = shift;
my $row = shift;
- my %opt = @_;
- my $date = $opt{date} || time;
- my $census_digits = ($date < 1601449200) ? 11 : 15; # 9/30/2020, halfway
- # between the two filing
- # dates when it changed
-
my %e;
#censustract
if ( length($row->[0]) == 0 ) {
$e{'censustract_null'} = 'The package location has no census tract.';
- } elsif ($row->[0] !~ /^\d{$census_digits}$/) {
- $e{'censustract_bad'} = "The census tract must be exactly $census_digits digits.";
+ } elsif ($row->[0] !~ /^\d{11}$/) {
+ $e{'censustract_bad'} = 'The census tract must be exactly 11 digits.';
}
return \%e;
}