[freeside-commits] freeside/FS/FS geocode_Mixin.pm,1.7,1.8
Ivan,,,
ivan at wavetail.420.am
Tue Jul 19 14:27:08 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv16413
Modified Files:
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.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- geocode_Mixin.pm 22 Mar 2011 06:00:54 -0000 1.7
+++ geocode_Mixin.pm 19 Jul 2011 21:27:06 -0000 1.8
@@ -155,7 +155,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( {
@@ -168,6 +169,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