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

Geister

  • Beginner
  • *
  • Posts: 49
current config: Joomla Version 1.5.12 + VirtueMart 1.1.3 stable


Geister

  • Beginner
  • *
  • Posts: 49
Re: VAT based on shipping address
« Reply #2 on: June 19, 2009, 09:21:25 am »
1. Switch on the tax mode "Based on shipping address" and "Optional Account creation" to make it quick.
2. (Since for this example we'll use a German address, you have to add a new Tax Rate 19% (VAT in Germany) in the Admin panel. Then for the product you choose, you should put VAT Id: 19%)
3. "Add to Cart" this product. = you have the Subtotal and Total prices without taxes.
4. Press "Check out" and create or not create account with an US-address.
5. Press "Send Registration" - you have the Subtotal and Total prices without taxes. If you proceed to payment you will have a Total price with tax total 0.00. That is correct.
6. In the shipping information press "Add a new shipping address"
and use eg. this address:
Peter Mueller, Unter den Linden 1, Berlin 10117 Germany.

7. Press "Save" - you have the same subtotal and total price as without the taxes and you have Tax Total: the sum equal to 19%VAT of the product price.
19% is correct, but this sum is not added to the total price! It's the same bug as in Virtuemart 1.1.3 Stable.


Let's try another scenario.

1. Log out and "Add to cart" the product.
2. Press "Check out" and create or not create account with an EU-address.
(eg. Peter Mueller, Unter den Linden 1, Berlin 10117 Germany.)
3. Press "Send registration" and you will have a Subtotal and total price with added 19% VAT. That is correct. (If you now proceed to payment you will have the correct amount (price+shipping+VAT)).
4. In the "Shipping Information" press "Add a new shipping address" and use a US-address.
5. Press "Save" - you will have Tax Total=0.00, but this was not subtracted from the Total Price! If you now proceed to payment you will have the amount= Product Price + shipping + 19%VAT(!wrong!). And in the Tax Total field we see 0.00.

Again, it's the same bug as in Virtuemart 1.1.3 Stable.

Try the all above with EU-mode to see other variants of the same problem, namely:

1. If your billing address is in Germany (in other words: in EU), but you ship to the US (IOW: outside EU), the VAT must be subtracted, but it's not).

2. If your billing address is in the US (IOW outside EU), but you ship to Germany (or EU), the total price will be without VAT(must be with VAT), although in the field "Tax Total" we see the amount equal to 19%VAT (or other amount depending in which country the EU-business is located)!
Again, it's the same bug as in Virtuemart 1.1.3 Stable.



To my opinion, it's the most serious bug in Virtuemart now. It makes the program useless or illegal to use for EU-businesses who ship all over the world. As someone said here, "it's a show stopper"...  ::)
current config: Joomla Version 1.5.12 + VirtueMart 1.1.3 stable

Bruce Morgan

  • Full Member
  • ***
  • Posts: 672
Re: VAT based on shipping address
« Reply #3 on: June 19, 2009, 16:09:09 pm »
I agree.  There is a similar problem relating to taxable/nontaxable items shipping to different locations within the USA.  The whole system has major holes in it. With my onw webs ite I have had to decide which mode to use based on guessing which one will screw up the fewest transactions.  I wonder if the whole handling of taxation should be rebuilt from the ground up.

Bruce
www.pepper-passion.com

mauri

  • Quality&Testing Team
  • Jr. Member
  • *
  • Posts: 297
Re: VAT based on shipping address
« Reply #4 on: June 19, 2009, 17:07:03 pm »
OK. Now I get it. You are right.
I see if I find solution
VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

mauri

  • Quality&Testing Team
  • Jr. Member
  • *
  • Posts: 297
Re: VAT based on shipping address
« Reply #5 on: June 19, 2009, 20:59:33 pm »
These attached files is only demo.
Backup first files:
/administrator/components/com_virtuemart/classes/
Then unzip attached files and upload/overwrite on your server.

Give feedback.


EDIT ALL files 20.06.2009 3:24
files fixes wrong tax shipping_address and EU mode.
wrong tax when in backend adds new product or change item price in existing order http://dev.virtuemart.net/cb/issue/2502

EDIT ALL files 20.06.2009 21:09
fixes:
-if checkout layer "Tax Total contains" product tax 0, we don´t need to show it.
-if backend order edit change price (shopper is eu and shipping is out of eu, tax is wrong
-some undefined variables.

EDIT ALL files 22.06.2009 19:33

Files are in Virtuemart 1.1.4 ->
VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

Geister

  • Beginner
  • *
  • Posts: 49
Re: VAT based on shipping address
« Reply #6 on: June 19, 2009, 22:44:27 pm »
this test was true before the previous post was edited: "EDIT ALL files 20.06.2009 3:24"

Highlighted red differs from my previous test.

1. Switch on the tax mode "Based on shipping address" and "Optional Account creation" to make it quick.
2. (Since for this example we'll use a German address, you have to add a new Tax Rate 19% (VAT in Germany) in the Admin panel. Then for the product you choose, you should put VAT Id: 19%)
3. "Add to Cart" this product. = you have the Subtotal and Total prices without taxes.
4. Press "Check out" and create or not create account with an US-address.
5. Press "Send Registration" - you have the Subtotal and Total prices without taxes. If you proceed to payment you will have a Total price with tax total 0.00. That is correct.
6. In the shipping information press "Add a new shipping address"
and use eg. this address:
Peter Mueller, Unter den Linden 1, Berlin 10117 Germany.

7. Press "Save" - you have the subtotal and total price with the tax 19% and you have Tax Total: the sum equal to 19%VAT of the product price.
19% is added to the total price! That is correct.
If proceed to payment we have Subtotal with VAT+shipping = Total with VAT and shipping. In the Tax Total we see the sum equal to VAT. That is correct.

No bug found!

Let's try another scenario.

1. Log out and "Add to cart" the product.
2. Press "Check out" and create or not create account with an EU-address.
(eg. Peter Mueller, Unter den Linden 1, Berlin 10117 Germany.)
3. Press "Send registration" and you will have a Subtotal and total price with added 19% VAT. That is correct. (If you now proceed to payment you will have the correct amount (price+shipping+VAT)).
4. In the "Shipping Information" press "Add a new shipping address" and use a US-address.
5. Press "Save" - you will have Tax Total=0.00, and VAT was subtracted from the Total Price! If you now proceed to payment you will have the amount= Product Price + shipping (!correct!). And in the Tax Total field we see 0.00.

No bug found!

Try the all above with EU-mode:

1. If your billing address is in Germany (in other words: in EU), but you ship to the US (IOW: outside EU), the VAT must be subtracted, but it's not. The total price = Product price + VAT + shipping. The Tax Total shows the sum equal to 19%VAT.

!!! Bug still found !!!

2. If your billing address is in the US (IOW outside EU), but you ship to Germany (or EU), the total price is with VAT, and in the field "Tax Total" we see the amount equal to 19%VAT.

No bug found!
current config: Joomla Version 1.5.12 + VirtueMart 1.1.3 stable

aravot

  • Peter
  • Moderator
  • Sr. Member
  • *
  • Posts: 2874
    • VirtueMart Extensions
Re: VAT based on shipping address
« Reply #7 on: June 20, 2009, 00:29:58 am »
Confirmed Mauri's fix works for tax mode base on shipping address.

Have not checked with EU mode or tax mode base on vendor address.

mauri

  • Quality&Testing Team
  • Jr. Member
  • *
  • Posts: 297
Re: VAT based on shipping address
« Reply #8 on: June 20, 2009, 02:32:27 am »
I have edit files in previous post.
files fixes wrong tax shipping_address and EU mode.
wrong tax when in backend adds new product or change item price in existing order. http://dev.virtuemart.net/cb/issue/2502

Hope these works, pleace test xD
VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

Geister

  • Beginner
  • *
  • Posts: 49
Re: VAT based on shipping address
« Reply #9 on: June 20, 2009, 10:37:05 am »
Yes, now it all seems to work. To me it's a breakthrough!!! Many thanks!
current config: Joomla Version 1.5.12 + VirtueMart 1.1.3 stable

mauri

  • Quality&Testing Team
  • Jr. Member
  • *
  • Posts: 297
Re: VAT based on shipping address
« Reply #10 on: June 20, 2009, 20:26:55 pm »
I have edit files again, in post with attached files.

pleace test, edit order backend(change product price, add item)
and give feedback.
VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

Geister

  • Beginner
  • *
  • Posts: 49
Re: VAT based on shipping address
« Reply #11 on: June 20, 2009, 21:15:03 pm »
Flaws found:

1) in the "based on shipping mode" after first putting an EU-address, the Total price is correct, but the raw TAX TOTAL with the VAT is not shown.
It appears when you proceed to Payment method. (I don't remember if it was shown before, but after ADDING A NEW SHIPPING US-ADDRESS (before going to Payment method), the raw TAX TOTAL appears with 0.00 as it should be). (In EU-mode the raw TAX TOTAL is displayed OK)

If you UPDATE BILLING ADDRESS and put again EU-address, the raw TAX TOTAL disappears again.

2). Czech Republic, France  are not recognized as EU-countries. With Germany it's all right, but if I put the address in Prague or Paris, the system does not add VAT as if that's a US-address. I did not check other countries. I used Czech Republic and France just casually, the first that came to my mind.
(as far as I remember it was OK in the previous versions of the files)


In EU-mode no bugs found.
current config: Joomla Version 1.5.12 + VirtueMart 1.1.3 stable

Geister

  • Beginner
  • *
  • Posts: 49
Re: VAT based on shipping address
« Reply #12 on: June 22, 2009, 12:56:38 pm »
One more bug

1. Create a product or open an existing test product without a discount.
2. Enter a product price (eg. 20 GBR) and save.
3. Go to the shop and open that product. You will see 20 GBR.
4. Go back to the product admin and add any Discount Type (eg. 6 GBR). Save.
5. Go back to the shop and refresh. You will see product price 20 GBR-6GBR=14 GBR.
so far so good...

6. Go back to the product admin and remove the Discount Type (none). Save. The Discounted Price disappears and again the product price must be 20 GBR.
7. Go to the shop and open that product again. You will see that the product price is still 20 GBR-6GBR=14 GBR.

The only way to remove the discount price is to delete the product completely and create it from the beginning.
current config: Joomla Version 1.5.12 + VirtueMart 1.1.3 stable

mauri

  • Quality&Testing Team
  • Jr. Member
  • *
  • Posts: 297
Re: VAT based on shipping address
« Reply #13 on: June 22, 2009, 16:28:55 pm »
Flaws found:

1) in the "based on shipping mode" after first putting an EU-address, the Total price is correct, but the raw TAX TOTAL with the VAT is not shown.
It appears when you proceed to Payment method. (I don't remember if it was shown before, but after ADDING A NEW SHIPPING US-ADDRESS (before going to Payment method), the raw TAX TOTAL appears with 0.00 as it should be). (In EU-mode the raw TAX TOTAL is displayed OK)

If you UPDATE BILLING ADDRESS and put again EU-address, the raw TAX TOTAL disappears again.

2). Czech Republic, France  are not recognized as EU-countries. With Germany it's all right, but if I put the address in Prague or Paris, the system does not add VAT as if that's a US-address. I did not check other countries. I used Czech Republic and France just casually, the first that came to my mind.
(as far as I remember it was OK in the previous versions of the files)


In EU-mode no bugs found.
1)This is OK. I have 'test based on shipping mode' with original files, and Total tax shows only when you select shipping address.

Should we add the registered customer shipping address, before select shipping address?

2)Can´t confirm. If you have set Czech Republic and France taxrates in backend, they should show :o
VirtueMart,(Joomla-phpShop, mambo-phpShop) since 2004-03-11

Geister

  • Beginner
  • *
  • Posts: 49
Re: VAT based on shipping address
« Reply #14 on: June 22, 2009, 16:58:15 pm »
2)Can´t confirm. If you have set Czech Republic and France taxrates in backend, they should show :o

No, I haven't...:) Thanks!
current config: Joomla Version 1.5.12 + VirtueMart 1.1.3 stable