Re: Making a customer tax exempt
dbrewster: I downloaded the newest version of the module from the zen cart site. I like the mod however I had some troubles in getting it to work properly.
It seems there is a 2 sections of code labeled
Code:
//Absolute Solutions Edit
These sections of code appear to be absolute reset sections that allow full control over the variables, which is great but it took me a bit to find and comment them out. Maybe in future releases mention that this needs to be commented out in the documentation.
Furthermore, one minor improvement I made was to make the display name of the tax class display , instead of the generic 'Tax Exempt:'
Place this :
Code:
$this->title = $tax_exempt_discount->fields['tax_exempt_name'];
under this :
Code:
function process() {
global $db, $order, $currencies;
$tax_exempt_query = $db->Execute("select customers_tax_exempt from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'");
if ($tax_exempt_query->fields['customers_tax_exempt'] != '0') {
$tax_exempt_discount = $db->Execute("select tax_exempt_name, tax_exempt_percentage from " . TABLE_TAX_EXEMPT . " where
tax_exempt_id = '" . $tax_exempt_query->fields['customers_tax_exempt'] . "'");
$order_total = $this->get_order_total();
$gift_vouchers = $_SESSION['cart']->gv_only();
$discount = ($order_total - $gift_vouchers) * $tax_exempt_discount->fields['tax_exempt_percentage'] / 100;
This might not work great in mulit-lingual sites but in single language sites It is great as it allows you to give your customers more description on what exemption they are receiving, which accountants always like.
Other than that it seems like a great module thanks a bunch.
Re: Making a customer tax exempt
can you make them tax exempt from just one of the 2 taxs?
Re: Making a customer tax exempt
MB1: The way the tax exempt module works is that it generates a negative amount based on a percentage you select. It does this based on the subtotal, so if you wanted to exempt someone for PST in Ontario, you could give that customer a 8% tax exemption, which nullifies the 8% that will be added in by the tax module.
So yes you can exempt people from 1 or more taxes or even parts of taxes based on the percentage you put into the exemption.
Re: Making a customer tax exempt
I would be cautious using this module when also using discount coupons or group pricing.
Here's a section of a sample order I set up on my cart: it looks fine at first glance, but the numbers don't add up.
http://calvinspeaks.org/misc/taxexempt.jpg
The sub total plus shipping minus the Discount Code amount don't equal what the total at the end says.
I may yet be able to get the two modules to play well together (Tax Exempt and Discount Coupon), but we'll see...
In the meantime, you should do a sample order and use a calculator to make sure that the numbers all make sense.
Re: Making a customer tax exempt
That seems like you might have to change the order that the discounts are being applied in. Check the order that your order total module is running the sub modules. At least I think that might fix it.
Re: Making a customer tax exempt
For example, in Admin > Modules > Order Total,
Quote:
My Group Discount settings:
Sort Order
500
Include Shipping
true
Include Tax
true
Re-calculate Tax
None
Tax Class
Taxable Goods
Quote:
My tax settings:
Sort Order
300
Quote:
My tax exempt settings:
Sort Order
310
Include Shipping
false
Include Tax
true
Re-calculate Tax
None
Tax Class
Taxable Goods
Getting the sort order and the "Re-calculate Tax" setting right is critical. I had the same problem that lukemcr describes until I did more research on the boards and found the right settings for Order Total.
Also: any comments in the code like "//Absolute Solutions Edit" are a reference to the programmer (Absolute Solutions = Chris Eden) who wrote the code, not the functionality of the code! I would hesitate to remove those sections since he fixed problems that pre-existed with this module.
---Diana
Re: Making a customer tax exempt
Oh yeah, I've done that: the checkout order is ordered just like it says in the readme. If you put it in another order, it will display incorrectly. (Tax is applied after the discount is taken, but the tax exemption value is applied before.)
Re: Making a customer tax exempt
This is my Admin > Modules > Order Total page.
http://calvinspeaks.org/misc/ordertotal.jpg
As you can see, it's just like it's described in the readme: the only difference is that I'm using a discount code "Membership Discount Code" renamed from "Discount Coupon" instead of a Group Discount. (The membership discount code has the same sort order as the Group Discount, however.)
The problem here is that the coupon module is taking 20% off of the order total plus tax plus shipping. Tax-exempt doesn't hide the tax from discount code, so I guess both modules aren't working great.
Thanks for responding, guys. :-)
Re: Making a customer tax exempt
Sorry for the triple post, guys. :(
I had enabled the discount code on tax and shipping. (It's fixed now though.) The problem is more cut and dried now though:
The tax exempt module subtracts the 6% tax ($99.60) from the subtotal before the discount code kicks in. The tax exempt module should subtract the tax after the discount code is applied. (Subtract $59.76 instead of $99.60)
Here it is now:
http://calvinspeaks.org/misc/taxexempt1.jpg
And here it is after I change the tax order to be after the discount code.
http://calvinspeaks.org/misc/taxexempt3.jpg
It's the same problem as before, except you can see the problem in the order total process, as opposed to before, when you couldn't.
Sorry for all the pictures. :-(
Re: Making a customer tax exempt
Is your Group Discount set to recalculate tax? There is a setting like that for several of the components.
You might play around with the order of the Order Total, it has a profound impact on the order of calculations.
I did use Group Discount along with tax exempt status, and I also had erroneous totals until I found the right order, and right settings for "recalculate tax".
Here's mine: http://www.coreknowledge.org/CK/imag...otal_order.gif
---Diana