Developer forum

Forum » Ecommerce - Standard features » Prices in DB with VAT

Prices in DB with VAT

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I have "Prices in DB include VAT" turned on and entered prices that include VAT. For shipping, I set to not calculate tax over shipping. Yet when I enter a fee it's treated as it was without VAT For example, 5 becomes 4 something). I can fake the price by adding the system VAT on it (enter 6  which then becomes five on display) so the fee during checkout then looks good. However, that skews the (calculated) VAT percentage on the checkout.

is this a supported scenario or am I better off storing prices without VAT?


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Generally, prices in db should never be with vat, see https://doc.dynamicweb.com/documentation-9/ecommerce/payment-shipping/vat-taxes

But - if prices in db is with vat, and system vat is i.e. 25%, that will be taken out of any price found in the database including fees. Then when the prices is shown - with vat, vat is added again. But not for shipping fee because of that checkbox you have set to not calculate ./Globalsettings/Ecom/Order/ShippingFee/IncludeVATOnShippingFee should be true and not false.

BR Nicolai

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

I see, thanks. I have now switched to using prices ex VAT in the database; that makes things a lot easier.

I think also Rapido has some weird quirk or design issue. On the order confirmation screen, it calculates the average VAT percentage. My system VAT is 21% and for shipping it's zero. On the order confirmation screen, I then see: VAT 17.1% 12,99 which is total percentage over the actual products and the shipping free. I don't think that's a common way to present it. You would normally break it down per rate:

21%       12,99
0%          0,00

That odd calculation threw me off a bit trying to understand the shipping fees.

Thanks!

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

I just looked at the Rapido code and found that it's using a standard tag called VatPercentage, so it's not Rapido after all...

 
Nicolai Pedersen
Reply

No, that is a calculated percentage on the order it self. But each orderline and fee has its own vat % that could be summed in groups in the template instead. We are just not good at that in DK as we have 25% on everything except stamps and newspapers...

BR Nicolai

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Following up on this, I have prices without VAT in the database. I want to show VAT for the shipping on the cart correctly and want to show consumer prices. As an example my consumer fee is 7 euros. When checking out to Denmark, the VAT of that is 1.4 and the fee is 5.60. When checking out to the Netherlands, the VAT is 1.21 and the fee 5.79. However, when I configure the price without VAT as 5.79, it shows up as 7.01 in the UI. I can change it in the backend to be 5,785 and it show up correctly as 7.00. However, the next time I open and save the shipping provider the value is rounded up again to 5.79.

How can I solve this? I want to show the consumer price of 7 euros for all countries, and include the correct VAT portion in the total VAT for the order.

Thanks!

 
Anders Ebdrup
Anders Ebdrup
Reply

We have the exact same request from our clients, so I am curious for a general solution here.

 
Nicolai Pedersen
Reply

Yeah. I see the issue. 

By using the rounding you can probably solve the issue right now.

But if we need to find a more stable solution, would that be on the delivery price being able to set a checkbox saying "Target delivery price with VAT" on the "edit shipping method" screen and then DW will calculate backwards and find whatever the fee should be without VAT depending on the current vat? And the same checkbox on the fees rule list.

Or do any of you have other suggestions?

BR Nicolai

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Yeah, I think that would be the best option. That way, you can configure a single consumer price for all countries, and then VAT is calculated backwards correctly.

At the moment, I have the following work around:

1. For each of the 9 countries, I set up the shipping options. I needed to do that so I can set the correct Ex. VAT price for each of them.

2. For the ones with a rounding issue, I save the value with 3 decimals so it works correctly.

3. Just in case someone saves the settings in the backend, I have a SQL script scheduled task that updates the prices for the few countries that require three decimals every X minutes.

Imar

 

You must be logged in to post in the forum