Sylius / ShopApiPlugin

Shop API for Sylius.
https://sylius.com
129 stars 89 forks source link

[FEATURE] Support for subTotal - added in Sylius 1.6 #595

Open AndreasA opened 5 years ago

AndreasA commented 5 years ago

With Sylius 1.6 they added better support regarding taxes and subtotal. The itemsTotal always includes taxes. Now the summary contains the items total (with tax) - if strategy is set accordingly - or without tax the sub total. This was added with https://github.com/Sylius/Sylius/pull/10400/files

AndreasA commented 5 years ago

In general you need various improvements regarding this as e.g. shipping charges by default include the tax in Sylius (always). However, the tax total also includes the tax of the shipping charges, so any subtotal one might calculate manually will always be wrong.

mamazu commented 5 years ago

Yes, that is true. The totals object is quite confusing.

AndreasA commented 5 years ago

I also think it is a bit confusing how Sylius itself handles it in their entities. Having one method that returns the value with and one without taxes would make it way easier to get the desired values for the webshop.