fix tax calculation based on ship address, from #17051
authorMark Wells <mark@freeside.biz>
Mon, 7 May 2012 19:45:22 +0000 (12:45 -0700)
committerMark Wells <mark@freeside.biz>
Mon, 7 May 2012 19:45:22 +0000 (12:45 -0700)
FS/FS/cust_pkg.pm
httemplate/search/report_tax.cgi

index 1cca10b..27c25da 100644 (file)
@@ -3682,7 +3682,7 @@ sub _location_sql_where {
 
 #        ( $table.${prefix}city    = ? $or_empty_city   $ornull )
   "
-        ( $table.${prefix}district = ? OR ? = '' OR CAST(? AS text) IS NULL )
+        ( $table.district = ? OR ? = '' OR CAST(? AS text) IS NULL )
     AND ( $table.${prefix}city     = ? OR ? = '' OR CAST(? AS text) IS NULL )
     AND ( $table.${prefix}county   = ? $or_empty_county $ornull )
     AND ( $table.${prefix}state    = ? $or_empty_state  $ornull )
index bfbc5fe..248f6c5 100755 (executable)
@@ -275,7 +275,7 @@ sub gotcust {
   my $table = shift;
   my $prefix = @_ ? shift : '';
   "
-        ( $table.${prefix}district = cust_main_county.district
+        ( $table.district = cust_main_county.district
           OR cust_main_county.district = ''
           OR cust_main_county.district IS NULL )
     AND ( $table.${prefix}city  = cust_main_county.city