PDA

View Full Version : How to change the tax rule?



awyckma
April 23rd, 2003, 04:43 AM
Hi All,

Here in Europe we do not use a Tax based on the state or county/province you live in. The tax is general for the whole country.

Is there a way to change the tax rule in such a way that it is not based anymore on the state/county but on the country. Living in Belgium we have normally two tax rates to apply: 6% and 21% of which the 21% is been applied mostly. If we ship outside Belgium we do not apply the tax. The customer in the other country will pay the tax when the goods are passing customs.

That is also the reason why we in Europe do not use the State/county info at all when registering or leaving address info.

Cheers,

Jamie
April 30th, 2003, 11:28 AM
Hi Alex,

Sorry for the delay. We will be looking at adding this functionality in a future version. You might be able to accomplish it like this:

The current version of the "squirrelcart/functions/get_tax_rate.func" looks like this:


<?
function get_tax_rate () {
// purpose of function is to return a decimal indicating the percent of sales tax based on state order is being shipped to
global $SESSION;
$tax_rate = get_field_val("Sales_Tax","Tax","State = ".$SESSION['order']['Ship_Addr']['State_or_Province']);
$tax_rate = $tax_rate * .01;
return $tax_rate;
}
?>

If you change it to something like this, it might work for you:


<?
function get_tax_rate () {
// purpose of function is to return a decimal indicating the percent of sales tax based on state order is being shipped to
global $SESSION;
$tax_rate = 5.00; // put your tax percentage here for Belgium
if ($SESSION['order']['Ship_Addr']['Country'] == 18) { ; // record number for Belgium
$tax_rate = $tax_rate * .01;
}
return $tax_rate;
}
?>

I haven't tested this at all, but it should work. :squirrel:

Thanks,
Jamie

Martijn
December 27th, 2005, 02:42 PM
Hi Squirrelcart,

I searched this forum for my problem and the problem above looks a lot like mine.

I have a dutch webshop, where most products have a tax rate of 19%. I have VAT enabled on the warehouse page and set the VAT Rate 2 to 19. When I order a product I dont see the VAT in the total price. Is this only possible if I apply the tax rate on a state?

Sincerely,

Martijn Pieterse

Martijn
January 23rd, 2006, 08:59 AM
Ello,

still no reply :( . I tried the above, but didnt work in version 2.1! The cart just doenst show any vat or tax. Could someone please help me!

Ik keep trying...