Tax and B2C

已查看 99 次
跳至第一个未读帖子

Kapt

未读,
2013年12月17日 03:51:462013/12/17
收件人 django...@googlegroups.com
Hi,

We are making some tests based on OSCAR 0.6 to create a shop (once released 0.6 will be stable) for one of our client having a B2C approach. 
Currently, tax amounts are computed on the fly by the strategy, based on the price_excl_tax value. 
The problem with this occurs when the shop's manager wants to sell a product at a precise price including tax (let's say 10€) with a pricing policy based on a fixed rate (for example 20%).
As the amount of the tax has to be rounded using a ROUND_HALF_UP approach, the calculation from price_including_tax to price_excluding_tax is non-symmetrical.
It means that it isn't possible for the manager to fill the prices including_tax and that we determine in the form the corresponding price_excluding_tax even if we know the calculation formula from price_excluding_tax to price_including_tax.
In addition, for some couple of (price_including_tax value,fixed_rate_amount), it doesn't exists any price_excluding_tax, meaning that some price_including_tax values are impossible.

Ex: 
Let's say VAT is 0.9% (it exists in France for example), and I want to obtain price_including_tax = 47.65:

If price_excluding_tax = 47.22, tax_amount = 0.42498, rounded using ROUND_HALF_UP and D('0.01') to tax_amount = 0.42 giving a price_including_tax = 47.64
If price_excluding_tax = 47.23, tax_amount = 0.42507, rounded using ROUND_HALF_UP and D('0.01') to tax_amount = 0.43 giving a price_including_tax = 47.66


It appears that the VAT calculation problems (Filling prices including VAT or not, Calculation per line or globally) arises in most of the ERP and e-commerce software with sometimes no real solution proposed.
We're currently thinking about a way to solve this on Oscar, do you have some advice's for us ?

Many thanks for all the efforts you bring on Oscar.

Sincerely,
Benjamin.  

David Winterbottom

未读,
2013年12月17日 05:28:562013/12/17
收件人 django-oscar
​Good question.  I think the answer is country specific and whatever solution you choose should be run past an accountant.

In the UK, the HMRC guidelines are that retailers should never round down VAT. This means in your example, your could set price_excl_tax to 47.22 and round up the tax amount to get the correct price_incl_tax.

This system would work backwards too.  You could start with your price_incl_tax, calculate tax from there and round up to get your price_excl_tax.  Of course, this means tax won't be exactly 9% of the price_excl_tax but it generally won't be since we're using fixed precision values.
In short, use ROUND_CEILING when determining tax.

 

Many thanks for all the efforts you bring on Oscar.

Sincerely,
Benjamin.  

--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-oscar.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-oscar/7aab87ce-a98d-4450-aa3d-a041715dab53%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
David Winterbottom
Technical Director

Tangent Labs
84-86 Great Portland Street
London W1W 7NR
England, UK

Kapt

未读,
2013年12月20日 10:18:392013/12/20
收件人 django...@googlegroups.com、david.win...@tangentlabs.co.uk
Hi,

Thanks for the answer.
Rounding the VAT amount with a precision of 1 cent is problematic because for a basket with a high quantity (n) of the same product, we can have n cents more added on the final calculation.
The proper solution seems to make the computation always on the same way, so if the user fill the item price including vat, we must calculate the price excluding tax on the fly.

Do you think there is any way to use Oscar with prices filled including VAT or does it implies too much complications ?
If its possible, what do you recommend ? 
 

Thanks for your support.
Regards,
Benjamin PIERRE.

David Winterbottom

未读,
2013年12月20日 15:22:072013/12/20
收件人 django-oscar
On 20 December 2013 15:18, Kapt <kapt.p...@gmail.com> wrote:
Hi,

Thanks for the answer.
Rounding the VAT amount with a precision of 1 cent is problematic because for a basket with a high quantity (n) of the same product, we can have n cents more added on the final calculation.
The proper solution seems to make the computation always on the same way, so if the user fill the item price including vat, we must calculate the price excluding tax on the fly.

Do you think there is any way to use Oscar with prices filled including VAT or does it implies too much complications ?
If its possible, what do you recommend ?

​I think you could make that work in Oscar 0.6.  You could extend the stockrecord model to have an price_incl_tax field, then use a custom strategy to determine the price_excl_tax on the fly.

I don't think this solves the rounding issue you describe (where a high line quantity adds multiple cents to the end price due to rounding at the item level). I'm also not sure whether that's really a bug or not.​  If you round at the line level, then your unit prices might not have the right precision.  
 

For more options, visit https://groups.google.com/groups/opt_out.

Alberto Jacini

未读,
2016年7月14日 04:59:212016/7/14
收件人 django-oscar
Hi Benjamin,
I have this same problem, that I don't find a way to use price_incl_tax as my reference for pricing. Did finally find a good solution?
Thanks in advance for any help!
Alberto
回复全部
回复作者
转发
0 个新帖子