[freeside-commits] freeside/FS/FS cust_main.pm,1.376,1.377
Jeff Finucane,420,,
jeff at wavetail.420.am
Fri Oct 17 18:08:29 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv14181
Modified Files:
cust_main.pm
Log Message:
cope with overlapping (but with distinct endpoints) tax areas
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.376
retrieving revision 1.377
diff -u -d -r1.376 -r1.377
--- cust_main.pm 14 Oct 2008 00:50:33 -0000 1.376
+++ cust_main.pm 18 Oct 2008 01:08:27 -0000 1.377
@@ -5188,15 +5188,16 @@
my $extra_sql = "AND plus4lo <= '$plus4' AND plus4hi >= '$plus4'";
my $geocode = '';
- my $cust_tax_location =
- qsearchs( {
- 'table' => 'cust_tax_location',
- 'hashref' => { 'zip' => $zip, 'data_vendor' => $data_vendor },
- 'extra_sql' => $extra_sql,
- }
- );
- $geocode = $cust_tax_location->geocode
- if $cust_tax_location;
+ my @cust_tax_location =
+ qsearch( {
+ 'table' => 'cust_tax_location',
+ 'hashref' => { 'zip' => $zip, 'data_vendor' => $data_vendor },
+ 'extra_sql' => $extra_sql,
+ 'order_by' => 'plus4lo', #overlapping areas with distinct ends
+ }
+ );
+ $geocode = $cust_tax_location[0]->geocode
+ if scalar(@cust_tax_location);
$geocode;
}
More information about the freeside-commits
mailing list