Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Negative tax item - VAT included in the price #107

Open
pavelnikolov opened this issue Dec 13, 2012 · 9 comments
Open

Negative tax item - VAT included in the price #107

pavelnikolov opened this issue Dec 13, 2012 · 9 comments

Comments

@pavelnikolov
Copy link

If you have VAT included in the price in the extension the tax needs to be set to 0

if opts[:tax] < 0
  opts[:tax] = 0
end

fixed the issue for me and PayPal stopped complaining that the tax was invalid.

@JDutil
Copy link
Member

JDutil commented Jan 3, 2013

@pavelnikolov was this the solution to #106 for you?

@pavelnikolov
Copy link
Author

@JDutil yes, partially. I think now there is a pull request that has the issue fixed. Also you can take a look at quick and dirty solution I have in my fork that "works for me" for that specific case. So I cannot guarantee that it will work for you too. I haven't had the time to review the issue thoroughly and fix it for all cases.

@JDutil
Copy link
Member

JDutil commented Jan 4, 2013

I believe this is actually a separate issue than #106 which should be all set now. Is it normal that there could be a negative tax amount w/VAT? That seems like it is more an issue with the tax calculation being negative to me than anything else, but I'm not that familiar with VAT.

If having a negative value is common and not a miscalculation of tax than I think we would need to subtract it from the order total being sent rather than to cancel out the negative tax amount. Since you would be overcharging each customer that is due the negative tax amount if you just set the tax to 0 wouldn't you be?

@pavelnikolov
Copy link
Author

As far as I remember when the VAT is refunded there is a negative adjustment added to the order with the same amount as the tax. So setting the tax to 0 fixed the problem for me. PayPal just does not work with negative tax. But you can have as many negative items as you want. Correct me if I'm wrong.

@JDutil
Copy link
Member

JDutil commented Jan 4, 2013

Sorry I'm not familiar enough with how the VAT works. I wouldn't think you would have a negative amount when checking out. I could understand if there was a refund after checkout added to the order.

@pavelnikolov
Copy link
Author

Here is simple step to reproduce:

  1. create VAT tax for example 20% (0.2) and
  2. create a default tax zone that applies this VAT to specific country (let's say Bulgaria for example)
  3. in tax settings set the VAT to be included in the Price. (this means that when for example you import a product with price 100 EURO this price includes the item price + 20% VAT - this automatically means that the item price without the VAT is 83,3333333)
  4. When you try to place an order with billing country different from Bulgaria in our example (in real it would be a country outside of EU) then we need to charge the item price without the 20% VAT. So we either subtract the total VAT from the order or we have to calculate the correct item prices after the country is selected. But either way PayPal does not accept negative tax. So we add a discount with the same value as the negative tax. This way PayPal does not complain.

Hopefully this is clear. I don't have enough time for this now since I'm very busy with 3 client projects. As soon as I have some time I can setup an app on Heroku for example where you can take a look. In the mean time you can use the steps above to reproduce it. It does not require to be familiar with how VAT works (except for the fact that it is only charged when the buyer is from EU).

Pavel

On 04.01.2013, at 11:45, Jeff Dutil wrote:

Sorry I'm not familiar enough with how the VAT works. I wouldn't think you would have a negative amount when checking out. I could understand if there was a refund after checkout added to the order.


Reply to this email directly or view it on GitHub.

@steveroot
Copy link

Hi all,
Hopefully I'm adding some value here...

@pavel - I understand your 4 steps.

I also have VAT (in the UK), and we have VAT at different rates on
different products. I also have my store set as 'VAT to be included in the
price' - your step 3. I'm fortunate in that we don't sell outside the UK
so everyone of our customers pays the VAT and all my products are within
one VAT rate too.

However, if I was to sell to multiple tax zones why not skip step 3 (==NOT
include vat in the price) and to calculate VAT based on destination [spree
zone if I remember correctly]?

I know my reason for not doing that... I wanted to display prices Including
VAT and setting 'include VAT in the price' just worked for my small store
and simple needs.

Would that approach not solve the Paypal tax problem you're having? Or does
it create another problem for you?

Steve

On 4 January 2013 10:05, pavelnikolov [email protected] wrote:

Here is simple step to reproduce:

  1. create VAT tax for example 20% (0.2) and
  2. create a default tax zone that applies this VAT to specific country
    (let's say Bulgaria for example)
  3. in tax settings set the VAT to be included in the Price. (this means
    that when for example you import a product with price 100 EURO this price
    includes the item price + 20% VAT - this automatically means that the item
    price without the VAT is 83,3333333)
  4. When you try to place an order with billing country different from
    Bulgaria in our example (in real it would be a country outside of EU) then
    we need to charge the item price without the 20% VAT. So we either subtract
    the total VAT from the order or we have to calculate the correct item
    prices after the country is selected. But either way PayPal does not accept
    negative tax. So we add a discount with the same value as the negative tax.
    This way PayPal does not complain.

Hopefully this is clear. I don't have enough time for this now since I'm
very busy with 3 client projects. As soon as I have some time I can setup
an app on Heroku for example where you can take a look. In the mean time
you can use the steps above to reproduce it. It does not require to be
familiar with how VAT works (except for the fact that it is only charged
when the buyer is from EU).

Pavel

On 04.01.2013, at 11:45, Jeff Dutil wrote:

Sorry I'm not familiar enough with how the VAT works. I wouldn't think
you would have a negative amount when checking out. I could understand if
there was a refund after checkout added to the order.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/107#issuecomment-11877848.

@pavelnikolov
Copy link
Author

@Steve

Maybe it will solve it I don't know - it was a customer requirement - the client insisted that the VAT be included in the price. And also I have another client in Sweden who also told me that this was required for his shop as well. So I was just trying to fulfill clients' requirements.

Pavel

On 04.01.2013, at 12:37, Steve Root wrote:

Hi all,
Hopefully I'm adding some value here...

@pavel - I understand your 4 steps.

I also have VAT (in the UK), and we have VAT at different rates on
different products. I also have my store set as 'VAT to be included in the
price' - your step 3. I'm fortunate in that we don't sell outside the UK
so everyone of our customers pays the VAT and all my products are within
one VAT rate too.

However, if I was to sell to multiple tax zones why not skip step 3 (==NOT
include vat in the price) and to calculate VAT based on destination [spree
zone if I remember correctly]?

I know my reason for not doing that... I wanted to display prices Including
VAT and setting 'include VAT in the price' just worked for my small store
and simple needs.

Would that approach not solve the Paypal tax problem you're having? Or does
it create another problem for you?

Steve

On 4 January 2013 10:05, pavelnikolov [email protected] wrote:

Here is simple step to reproduce:

  1. create VAT tax for example 20% (0.2) and
  2. create a default tax zone that applies this VAT to specific country
    (let's say Bulgaria for example)
  3. in tax settings set the VAT to be included in the Price. (this means
    that when for example you import a product with price 100 EURO this price
    includes the item price + 20% VAT - this automatically means that the item
    price without the VAT is 83,3333333)
  4. When you try to place an order with billing country different from
    Bulgaria in our example (in real it would be a country outside of EU) then
    we need to charge the item price without the 20% VAT. So we either subtract
    the total VAT from the order or we have to calculate the correct item
    prices after the country is selected. But either way PayPal does not accept
    negative tax. So we add a discount with the same value as the negative tax.
    This way PayPal does not complain.

Hopefully this is clear. I don't have enough time for this now since I'm
very busy with 3 client projects. As soon as I have some time I can setup
an app on Heroku for example where you can take a look. In the mean time
you can use the steps above to reproduce it. It does not require to be
familiar with how VAT works (except for the fact that it is only charged
when the buyer is from EU).

Pavel

On 04.01.2013, at 11:45, Jeff Dutil wrote:

Sorry I'm not familiar enough with how the VAT works. I wouldn't think
you would have a negative amount when checking out. I could understand if
there was a refund after checkout added to the order.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/107#issuecomment-11877848.


Reply to this email directly or view it on GitHub.

@steveroot
Copy link

That is my requirement as well, so I think (going back a year in my memory)
the reason I chose to check the box 'VAT included in the price' is because
otherwise the web site would display Excluding VAT prices. What I really
wanted was an option/check box/helper that would display the prices on the
web page as including VAT.
I didn't fancy editing all the views though and I could live with only
selling at one VAT rate to all customers, so I moved on.

On 4 January 2013 10:48, pavelnikolov [email protected] wrote:

@Steve

Maybe it will solve it I don't know - it was a customer requirement - the
client insisted that the VAT be included in the price. And also I have
another client in Sweden who also told me that this was required for his
shop as well. So I was just trying to fulfill clients' requirements.

Pavel

On 04.01.2013, at 12:37, Steve Root wrote:

Hi all,
Hopefully I'm adding some value here...

@pavel - I understand your 4 steps.

I also have VAT (in the UK), and we have VAT at different rates on
different products. I also have my store set as 'VAT to be included in
the
price' - your step 3. I'm fortunate in that we don't sell outside the UK
so everyone of our customers pays the VAT and all my products are within
one VAT rate too.

However, if I was to sell to multiple tax zones why not skip step 3
(==NOT
include vat in the price) and to calculate VAT based on destination
[spree
zone if I remember correctly]?

I know my reason for not doing that... I wanted to display prices
Including
VAT and setting 'include VAT in the price' just worked for my small
store
and simple needs.

Would that approach not solve the Paypal tax problem you're having? Or
does
it create another problem for you?

Steve

On 4 January 2013 10:05, pavelnikolov [email protected] wrote:

Here is simple step to reproduce:

  1. create VAT tax for example 20% (0.2) and
  2. create a default tax zone that applies this VAT to specific country
    (let's say Bulgaria for example)
  3. in tax settings set the VAT to be included in the Price. (this
    means
    that when for example you import a product with price 100 EURO this
    price
    includes the item price + 20% VAT - this automatically means that the
    item
    price without the VAT is 83,3333333)
  4. When you try to place an order with billing country different from
    Bulgaria in our example (in real it would be a country outside of EU)
    then
    we need to charge the item price without the 20% VAT. So we either
    subtract
    the total VAT from the order or we have to calculate the correct item
    prices after the country is selected. But either way PayPal does not
    accept
    negative tax. So we add a discount with the same value as the negative
    tax.
    This way PayPal does not complain.

Hopefully this is clear. I don't have enough time for this now since
I'm
very busy with 3 client projects. As soon as I have some time I can
setup
an app on Heroku for example where you can take a look. In the mean
time
you can use the steps above to reproduce it. It does not require to be
familiar with how VAT works (except for the fact that it is only
charged
when the buyer is from EU).

Pavel

On 04.01.2013, at 11:45, Jeff Dutil wrote:

Sorry I'm not familiar enough with how the VAT works. I wouldn't
think
you would have a negative amount when checking out. I could understand
if
there was a refund after checkout added to the order.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub<
https://github.com/spree/spree_paypal_express/issues/107#issuecomment-11877848>.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/107#issuecomment-11879408.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants