Tax Exemption for AC 7.0.7.14600
Tax Exemption for AC 7.0.7.14600
Hi there,
I've set up a couple groups that are tax exempt. I also set up the tax rules so that a 0% tax applies to people in these groups. In other words, tax exemption is set in two places: the group settings and the tax rules.
During checkout, no tax shows up. However, once a user places the order, they are charged taxes. This shows in the final receipt (/Checkout/Receipt.aspx) and in the order manager.
If I un-check Tax Exempt from the group settings and keep the tax rule, taxes show up during checkout. If I disable the tax rule and keep the Tax Exempt setting in the group, taxes don't show up during checkout but do in the final receipt and order manager.
So is this a bug? Is there a fix? I can hack the code, but I'd rather not.
Thanks,
Moustafa
I've set up a couple groups that are tax exempt. I also set up the tax rules so that a 0% tax applies to people in these groups. In other words, tax exemption is set in two places: the group settings and the tax rules.
During checkout, no tax shows up. However, once a user places the order, they are charged taxes. This shows in the final receipt (/Checkout/Receipt.aspx) and in the order manager.
If I un-check Tax Exempt from the group settings and keep the tax rule, taxes show up during checkout. If I disable the tax rule and keep the Tax Exempt setting in the group, taxes don't show up during checkout but do in the final receipt and order manager.
So is this a bug? Is there a fix? I can hack the code, but I'd rather not.
Thanks,
Moustafa
Re: Tax Exemption for AC 7.0.7.14600
The cart is using the Avalara third party tax provider, and it's the one that's computing the tax.
So it seems that AC gives precedence to the third party tax provider over its own internal classification of the person belonging to a tax-free group. Does this seem right?
Any workarounds or do I need to hack the code?
Thanks,
Moustafa
So it seems that AC gives precedence to the third party tax provider over its own internal classification of the person belonging to a tax-free group. Does this seem right?
Any workarounds or do I need to hack the code?
Thanks,
Moustafa
Re: Tax Exemption for AC 7.0.7.14600
Hello Moustafa,
Unfortunately, the 7.0.7 version with AvaTax has this issue with tax exempt. At the time it was written, I don't know if the developers intended on ignoring the tax exempt setting in AC. The other tax display settings were ignored as well, so it may have been intentional.
Do you have the source code?
Thanks
Katie
Unfortunately, the 7.0.7 version with AvaTax has this issue with tax exempt. At the time it was written, I don't know if the developers intended on ignoring the tax exempt setting in AC. The other tax display settings were ignored as well, so it may have been intentional.
Do you have the source code?
Thanks
Katie
Thank you for choosing AbleCommerce!
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
Re: Tax Exemption for AC 7.0.7.14600
Hi Katie,
Thanks for this. Unfortunately, I don't have the source code.
I wonder if there's a workaround. In NavigationHelper.cs, we find GetReceiptUrl(), which redirects the users to /Checkout/Receipt.aspx as a final step in the order placement process.
If I rewrite this function to delete the tax item from the ac_OrderItems table immediately before redirecting, this would seem to solve the problem, no?
I know this is very dirty and I should be lashed with a wet noodle for even suggesting such a thing, but can anyone see anything wrong with this approach?
Thanks,
Moustafa
Thanks for this. Unfortunately, I don't have the source code.
I wonder if there's a workaround. In NavigationHelper.cs, we find GetReceiptUrl(), which redirects the users to /Checkout/Receipt.aspx as a final step in the order placement process.
If I rewrite this function to delete the tax item from the ac_OrderItems table immediately before redirecting, this would seem to solve the problem, no?
I know this is very dirty and I should be lashed with a wet noodle for even suggesting such a thing, but can anyone see anything wrong with this approach?
Thanks,
Moustafa
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Tax Exemption for AC 7.0.7.14600
You can delete the tax item, but doing it on the receipt page would be after the order is placed and the order goes to the payment gateway so the payment would be wrong if you are using a payment gateway. Also, by that time the customer order confirmation has already been sent. You would need to delete it on the checkout page or the payment control before the order is actually saved. Before the CheckedOut event on the checkout page.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Tax Exemption for AC 7.0.7.14600
Thanks for the tip, Judy!
I was planning on doing it right before the redirection to the receipt page. However, that might be too late indeed. I'll do it before the CheckedOut event, as you mentioned.
The only issue that remains is orders placed from the admin side, but those should be rather rare.
I was planning on doing it right before the redirection to the receipt page. However, that might be too late indeed. I'll do it before the CheckedOut event, as you mentioned.
The only issue that remains is orders placed from the admin side, but those should be rather rare.
Re: Tax Exemption for AC 7.0.7.14600
Is there a known fix for this if you do have the source code, as opposed to removing items from the Basket before the CheckedOut event?
Thanks
Thanks
Re: Tax Exemption for AC 7.0.7.14600
I just fixed this for another client a few weeks ago. This solution applies to the 7.0.6 release of the Avatax provider. I do not believe the code changed in 7.0.7 but use caution regardless.
in full source, find the CommerceBuilder.Providers/Avalara/Avatax.cs file. In the Commit() routine, find the foreach() that contains the switch() command. Replace it with the following:
in full source, find the CommerceBuilder.Providers/Avalara/Avatax.cs file. In the Commit() routine, find the foreach() that contains the switch() command. Replace it with the following:
Code: Select all
// BEGIN MOD: AbleMods.com
// DATE: 07/16/2014
// the Commit() method is missing the code to properly handle coupons as found in Calculate()
// NEED TO GET TOTALS FOR ORDER COUPONS
decimal orderCouponTotal = 0;
// LIST THE ITEMS IN THE ORDER FOR THE TAX REQUEST
foreach (OrderItem item in order.Items)
{
Line line;
switch (item.OrderItemType)
{
case OrderItemType.Product:
line = GetTaxLine(order, item, defaultShipmentId, shipmentAddresses, defaultWarehouseId, warehouseAddresses);
break;
case OrderItemType.Shipping:
line = GetTaxLine(order, item, defaultShipmentId, shipmentAddresses, defaultWarehouseId, warehouseAddresses);
line.ItemCode = "SHIPPING";
if (string.IsNullOrEmpty(line.TaxCode)) line.TaxCode = "FR020100";
break;
case OrderItemType.Handling:
line = GetTaxLine(order, item, defaultShipmentId, shipmentAddresses, defaultWarehouseId, warehouseAddresses);
line.ItemCode = "HANDLING";
line.TaxCode = "OH010000";
break;
case OrderItemType.GiftWrap:
line = GetTaxLine(order, item, defaultShipmentId, shipmentAddresses, defaultWarehouseId, warehouseAddresses);
line.ItemCode = "GIFTWRAP";
break;
case OrderItemType.Coupon:
// IF THIS IS AN ORDER COUPON, IT CAN'T BE HANDLED VIA LINE ITEM
CouponType couponType = GetCouponType(item.Sku);
if (couponType == CouponType.Order) orderCouponTotal += Math.Abs((decimal)item.ExtendedPrice);
line = null;
break;
default:
line = null;
break;
}
if (line != null) getTaxRequest.Lines.Add(line);
}
// PROCESS ORDER COUPONS
if (orderCouponTotal > 0)
{
foreach (Line line in getTaxRequest.Lines)
{
if (line.ItemCode != "SHIPPING" && line.ItemCode != "HANDLING" && line.ItemCode != "GIFTWRAP")
{
line.Discounted = true;
}
}
getTaxRequest.Discount = (decimal)orderCouponTotal;
}
// END MOD: AbleMods.com
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: Tax Exemption for AC 7.0.7.14600
Thanks!
Can you upload a DLL somewhere? I don't have the source code.
Can you upload a DLL somewhere? I don't have the source code.
Re: Tax Exemption for AC 7.0.7.14600
I'm sorry I can't upload a DLL. Contact AbleCommerce and discuss obtaining full source code so the fix can be implemented yourself.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com