[freeside-commits] freeside/FS/FS geocode_Mixin.pm,1.2,1.2.2.1
Ivan,,,
ivan at wavetail.420.am
Tue Jul 19 14:27:09 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv16417
Modified Files:
Tag: FREESIDE_2_1_BRANCH
geocode_Mixin.pm
Log Message:
fix geocode guessing w/a 5 digit zip, RT#13595
Index: geocode_Mixin.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/geocode_Mixin.pm,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -w -d -r1.2 -r1.2.2.1
--- geocode_Mixin.pm 31 Oct 2010 01:07:52 -0000 1.2
+++ geocode_Mixin.pm 19 Jul 2011 21:27:07 -0000 1.2.2.1
@@ -133,7 +133,8 @@
$zip ||= '';
$plus4 ||= '';
#CCH specific location stuff
- my $extra_sql = "AND plus4lo <= '$plus4' AND plus4hi >= '$plus4'";
+ my $extra_sql = $plus4 ? "AND plus4lo <= '$plus4' AND plus4hi >= '$plus4'"
+ : '';
my @cust_tax_location =
qsearch( {
@@ -146,6 +147,11 @@
$geocode = $cust_tax_location[0]->geocode
if scalar(@cust_tax_location);
+ warn "WARNING: customer ". $self->custnum.
+ ": multiple locations for zip ". $self->get("${prefix}zip").
+ "; using arbitrary geocode $geocode\n"
+ if scalar(@cust_tax_location) > 1;
+
$geocode;
}
More information about the freeside-commits
mailing list