Cart is not correctly applying shipping state variable to tax rules
We currently have nexus in four states, and I have written tax rules for all municipalities within those four states. I have upwards of twenty tax rules that apply the shipping state variable, if it exists and is equal to (for example) Nebraska, followed by the municipality, if it exists and is equal to (for example) Creighton. My trouble is that Creighton (for example) is a town in two of the states in which we have nexus, and it appears that the cart tax rules are ignoring the state variable, proceeding to apply the tax rule for each state, essentially almost doubling the tax. For example, a 400 dollar item being shipped to Creighton, NE, where the tax rate is is 6.5% is being charged $42.00 because it is also applying the Creighton, SD tax rate, which is 4%, on top of the NE rate. My example code is as follows...
//eCart Rule
function WAEC_eCart1_Nebraska65SalesTax() {
$totalTax = 0;
if (true && ((isset($_SESSION['eCartCheckoutForm_shipping_state_province'])) && (isset($_SESSION['eCartCheckoutForm_shipping_city'])) && ((isset($_SESSION['eCartCheckoutForm_shipping_state_province'])?$_SESSION['eCartCheckoutForm_shipping_state_province']:"") == "NE") && ((isset($_SESSION['eCartCheckoutForm_shipping_city'])?$_SESSION['eCartCheckoutForm_shipping_city']:"") == "chester") || ((isset($_SESSION['eCartCheckoutForm_shipping_city'])?$_SESSION['eCartCheckoutForm_shipping_city']:"") == "cordova") || ((isset($_SESSION['eCartCheckoutForm_shipping_city'])?$_SESSION['eCartCheckoutForm_shipping_city']:"") == "creighton"))) {
$totalTax += ($this->GetTaxableTotal() * 0.065);//Result
}
return WA_eCart_FormatNumber($totalTax, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_SouthDakota4SalesTax() {
$totalTax = 0;
if (true && ((isset($_SESSION['eCartCheckoutForm_shipping_state_province'])) && (isset($_SESSION['eCartCheckoutForm_shipping_city'])) && ((isset($_SESSION['eCartCheckoutForm_shipping_state_province'])?$_SESSION['eCartCheckoutForm_shipping_state_province']:"") == "SD") && ((isset($_SESSION['eCartCheckoutForm_shipping_city'])?$_SESSION['eCartCheckoutForm_shipping_city']:"") == "creighton")|| ((isset($_SESSION['eCartCheckoutForm_shipping_city'])?$_SESSION['eCartCheckoutForm_shipping_city']:"") == "agar") || ((isset($_SESSION['eCartCheckoutForm_shipping_city'])?$_SESSION['eCartCheckoutForm_shipping_city']:"") == "allen") || ((isset($_SESSION['eCartCheckoutForm_shipping_city'])?$_SESSION['eCartCheckoutForm_shipping_city']:"") == "bath"))) {
$totalTax += ($this->TotalColumn("TotalPrice") * .04);//Result
}
return WA_eCart_FormatNumber($totalTax, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
Both are being applied to one purchase... any thoughts?