projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
477 reporting
[freeside.git]
/
FS
/
FS
/
Report
/
FCC_477.pm
diff --git
a/FS/FS/Report/FCC_477.pm
b/FS/FS/Report/FCC_477.pm
index
29505f8
..
0f5d4ce
100644
(file)
--- 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 $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
}
$num_errors++ if keys(%$eh);
push @$error, $eh
}
@@
-398,7
+398,7
@@
sub fbs_sql {
my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
- my $censustract = "
replace(cust_location.censustract, '.', ''
)";
+ my $censustract = "
substr( replace(cust_location.censustract, '.', ''), 1, 11
)";
my @select = (
"$censustract AS censustract",
my @select = (
"$censustract AS censustract",
@@
-442,19
+442,12
@@
sub fbs_sql {
sub fbs_check {
my $class = shift;
my $row = shift;
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.';
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
}
#technology
@@
-480,7
+473,7
@@
sub fvs_sql {
my $date = $opt{date} || time;
my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
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 $censustract = "
substr( replace(cust_location.censustract, '.', ''), 1, 11
)";
my @select = (
"$censustract AS censustract",
my @select = (
"$censustract AS censustract",
@@
-522,18
+515,12
@@
sub fvs_sql {
sub fvs_check {
my $class = shift;
my $row = shift;
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.';
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;
}
}
return \%e;
}