[HACK] Excluding specific customers from VAT charge

Modules, Add-ons and custom code that's more than just a quick hack or Mod.
Post Reply
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

[HACK] Excluding specific customers from VAT charge

Post by Martin »

Ray (Interspire) has posted up with this description
This is just an article I've written up which describes some methods which can be used to exclude a customer from being charged VAT (ie. in the case that they have a VATIN - vat identification number).

Currently Shopping Cart will apply tax to all customers that are covered by a specific tax rate so there is no way to exclude a certain customer from being charged even if they should be exempt.

In conjunction with a customer form field or a customer group you can apply this modification that will prevent tax from being applied to the order.
Reference
http://www.interspire.com/forum/showthr ... #post53111
meules
Confirmed
Confirmed
Posts: 95
Joined: Wed Jun 17, 2009 8:56 pm
Location: NL

Re: [HACK] Excluding specific customers from VAT charge

Post by meules »

Thx for this link, never saw it before :oops: I can't get this to work for v6.1.1. though. I'm in need of tax exempt for a customer group I have.
I just can't get this to work, not even when I used Windiff :(

This is my code which works for every version below V6

Code: Select all

public function GetSalesTaxRate($billingAddress, $shippingAddress=0)
		{
			// Setup the array which will be returned
			$taxData = array(
				"tax_name" => "",
				"tax_rate" => 0,
				"tax_based_on" => "",
				"tax_id" => 0,
				"tax_shipping" => 0
				
			);
//////////////// BOF EXEMPT CUSTOMER TAX HACK ////////////////////////////
			if ($this->GetCustomerId()) { 
				$info = $this->GetCustomerInfo(); 
				// is this customer part of tax exempt group? 
			if ($info['custgroupid'] == 10) {     
				return $taxData; 
				} 
			}  
//////////////// EOF EXEMPT CUSTOMER TAX HACK ////////////////////////////
I just can't see what I'm doing wrong.

Anyone have this working or can help me?

Nevermind, I totally missed this one :oops: :oops: :oops: :oops:
ISC v6
Post Reply