Author Topic: VAT based on shipping address  (Read 79205 times)

hotelathome

  • Jr. Member
  • **
  • Posts: 129
Re: VAT based on shipping address
« Reply #45 on: April 08, 2010, 01:42:01 am »
I cannot select the Subtract payment discout. It messes with the totals in the customer order view and the backend view when using coupon discounts. The amounts dont match up. It looks fine for the customer at check out, but if they log in to look at their order or pay via paypal the amounts get mucked up.

ozswisssurf

  • Beginner
  • *
  • Posts: 14
Re: VAT based on shipping address
« Reply #46 on: May 31, 2010, 23:47:45 pm »
Mauri,

We use VM 1.1.4, the store is based in switzerland (incl. VAT), we ship international and we've configured VAT based on shipping address and found a bug (Total Tax: is wrong) when no shipping address is given because the user checks "Same as Billing address".

Check this post: http://forum.virtuemart.net/index.php?topic=70966.0


Maybe you can help us, it's urgent we want to go online in 10 days.

Best regards,
Mark

mauri

  • Quality&Testing Team
  • Jr. Member
  • *
  • Posts: 297
Re: VAT based on shipping address
« Reply #47 on: June 01, 2010, 18:37:36 pm »
ozswisssurf
In VM backend. What taxrates have you set to :
- switzerland
- other countries
VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

ozswisssurf

  • Beginner
  • *
  • Posts: 14
Re: VAT based on shipping address
« Reply #48 on: June 08, 2010, 16:15:35 pm »
Mauri,

GREAT you responded. We go online in 4 days the time is running.

Originaly I set to "Switzerland" and then I added "France" with 0.0000 for test purpuses.

Thanks for your help
ozswisssurf

bmizes

  • Beginner
  • *
  • Posts: 1
Re: VAT based on shipping address
« Reply #49 on: July 30, 2010, 21:52:39 pm »
Mauri,

I have a related problem that was mentioned at the beginning of the thread but never actually addressed.  In the US, many states require tax to be calculated on the cost of the item plus shipping; that is, the shipping is to be taxed as well.  Virtuemart seems to assume that in all states in the US, shipping is not part of the tax calculation.  How can we get virtuemart to base the tax on the total of shipping plus the cost of the items?  Thanks.  Barry

mauri

  • Quality&Testing Team
  • Jr. Member
  • *
  • Posts: 297
Re: VAT based on shipping address
« Reply #50 on: August 01, 2010, 14:56:09 pm »
Go virtuemart backend, and :
Store -> Shipping Module List -> Klick the modulename you are use
Find tax class or tax ID.
If you use Standard Shipping Module, klick all rates and add tax in tax ID
VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

vale

  • Beginner
  • *
  • Posts: 1
Re: VAT 7,6 for SWITZERLAND CRITICAL!
« Reply #51 on: September 16, 2010, 12:46:07 pm »
Hello,

i found a problem.
i want to add to the tax tab for SWITZERLAND 7,6 and is not working.

how i add 0.7,600 to the tax tab.

Thanks

Regards
Vale

mauri

  • Quality&Testing Team
  • Jr. Member
  • *
  • Posts: 297
Re: VAT based on shipping address
« Reply #52 on: September 16, 2010, 15:46:26 pm »
0.076

The tax rate, as a decimal value. For example, 7.6% would be entered as 0.076
VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

tcherno

  • Beginner
  • *
  • Posts: 16
Re: VAT based on shipping address
« Reply #53 on: October 27, 2010, 01:50:27 am »
Hey!

Thank you very much for this little but VERY useful hack!

For Switzerland, we only need to apply 7.6% VAT if delivered in CHE and remove VAT if delivered outside CHE. So simple ;)

Just a "little" problem: your hack give us the ability to display prices with VAT if customer not logged in BUT the child products aren't displayed the same way (with VAT) if we didn't entered the price and VAT% in EACH child product.
The price is displayed without tax.

All the infos are supposed to be the same as the parent product.

Is there a way to display child products price with VAT the same way?
Without having to enter infos for each?

Thank you very much!

hotelathome

  • Jr. Member
  • **
  • Posts: 129
Re: VAT based on shipping address
« Reply #54 on: October 27, 2010, 01:55:59 am »
I had to add the price and vat (our tax is GST) for EACH child product to get it to work. Lots of data entry, but worth it to get it to work.

tcherno

  • Beginner
  • *
  • Posts: 16
Re: VAT based on shipping address
« Reply #55 on: October 27, 2010, 23:26:15 pm »
Hello!

Thank you :)

Yes, I understand if we enter price and VAT for each child it will work, but is there a way to not have to do it?

I'm sure people will forget some product and it will be the start of big trouble... ;)

Maybe we can apply the same idea to the child products price display?
But we have to know where to do it.

Thank you!

mauri

  • Quality&Testing Team
  • Jr. Member
  • *
  • Posts: 297
Re: VAT based on shipping address
« Reply #56 on: October 30, 2010, 12:17:48 pm »
Hi tcherno.
Make litle hack in:
/administrator/components/com_virtuemart/classes/ps_product.php

Find Rows 1598-1599:
Code: [Select]
$tax_rate_id = ps_product::get_field($product_id, 'product_tax_id');
if( $tax_rate_id == 0 ) {
Hack like this:
Code: [Select]
$tax_rate_id = ps_product::get_field($product_id, 'product_tax_id');
$product_parent_id = ps_product::get_field($product_id, 'product_parent_id');
if( $tax_rate_id == 0 && $product_parent_id ) {
$tax_rate_id = ps_product::get_field($product_parent_id, 'product_tax_id');
}
if( $tax_rate_id == 0 ) {


ADDED:
And make sure in Rows 1484-1486:
Code: [Select]
else {
$_SESSION['taxrate'][$ps_vendor_id] = 0;
}
Are hacked like this:
Code: [Select]
else {
// $_SESSION['taxrate'][$ps_vendor_id] = 0;

// let's get the store's tax rate
$q = "SELECT `tax_rate` FROM #__{vm}_vendor, #__{vm}_tax_rate ";
$q .= "WHERE tax_country=vendor_country AND #__{vm}_vendor.vendor_id=1 ";
// !! Important !! take the highest available tax rate for the store's country
$q .= "ORDER BY `tax_rate` ASC";
$db->query($q);
if ($db->next_record()) {
$_SESSION['taxrate'][$ps_vendor_id] = $db->f("tax_rate");
}
else {
$_SESSION['taxrate'][$ps_vendor_id] = 0;
}
return $_SESSION['taxrate'][$ps_vendor_id];

}
VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

tcherno

  • Beginner
  • *
  • Posts: 16
Re: VAT based on shipping address
« Reply #57 on: November 02, 2010, 11:53:32 am »
Hi mauri!

I will try it today.

THANK YOU so much!

tcherno

  • Beginner
  • *
  • Posts: 16
Re: VAT based on shipping address
« Reply #58 on: November 03, 2010, 17:06:54 pm »
Youhoooouuuuu!

It seems to work! :D

Thank you very much!

This will be useful for a lot of people in Switzerland.

zanardi

  • Contributing Developer
  • Full Member
  • *
  • Posts: 878
    • GiBiLogic
Re: VAT based on shipping address
« Reply #59 on: February 13, 2011, 15:43:38 pm »
People, i considered including this in Virtuemart 1.1.8 but i think it should remain an external hack. I think someone may want to be able to have different taxes for different child products.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter