In admin/functions/easypopulate_functions.php the tax query line 64:
Code: Select all
$tax_query = tep_db_query("select SUM(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " WHERE tax_class_id = '" . $tax_class_id . "' GROUP BY tax_priority");
Code: Select all
$tax_query = tep_db_query("select SUM(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za ON tr.tax_zone_id = za.geo_zone_id left join " . TABLE_GEO_ZONES . " tz ON tz.geo_zone_id = tr.tax_zone_id WHERE (za.zone_country_id IS NULL OR za.zone_country_id = '0' OR za.zone_country_id = '" . (int)STORE_COUNTRY . "') AND (za.zone_id IS NULL OR za.zone_id = '0' OR za.zone_id = '" . (int)STORE_ZONE . "') AND tr.tax_class_id = '" . (int)$tax_class_id . "' GROUP BY tr.tax_priority");
The original query applied the sum of all tax rates with the product tax class ID ignoring the zone.
It's supposed that the user will upload prices with the tax rate of the store country and zone. So using STORE_COUNTRY and STORE_ZONE should do the trick.