Developer forum

Forum » Integration » Negative VAT
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I have a site running 9.18.1 and the latest live integration. DW is configured to calculate the discounts. I have set up a discount for 908 kr and configured it to include tax.

When I add a product of 909 kr the disocunt is applied. I would expect to see a kr price and 0 tax but instead I see this:

Where does the negative VAT come from? Is there a setting I am missing?

Tried it on another recent Swift-based solution and it works as expected there.

Imar


Replies

 
Igor Ivanov Dynamicweb Employee
Igor Ivanov
Reply

Steps to reproduce - just add this product to cart http://perroy.staging.dynamicweb-cms.com/details?productid=6772330

There is no need to login, everything is already setup

 

I have done some testing and ruled out that it's a Swift bug - it's not, the value is negative in the database

The checkbox Ammount includes VAT is not working in your example, if you turn it on or off there is no difference

I think that is because it is set to always include VAT, so if you set the checkbox "Amount includes VAT" it will do nothing because it is already true

 

 

In my DW10 Demo it looks like this:

In this case the checbox is working

Disabling Live integration does not fix the issue

I don't have a 9.18.1 demo of latest Swift and DW available, but if the issue is not reproducable on that it's either a configuration issue or a custom code issue

I will try to look into the custom code next

 

 
Igor Ivanov Dynamicweb Employee
Igor Ivanov
Reply

There is a good chace that is this custom code that is causing the issue as there are mentions of discount calculations inside

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Igor,

Interesting; didn't know we have this discount stuff in there. But the code that does the calculation is based on a DiscountExtenderBase which doesn't come into play until you select it as an Extender Provider on the discount, right? That's currently set to None:

I'll poke around and see if there's other custom code also that could mess this up.

Thanks for looking into it!

 
Igor Ivanov Dynamicweb Employee
Igor Ivanov
Reply

There could be a different discount somewhere that contains the discount extender, so that is worth checking that you only have 1 discount calculating for the order

 

You must be logged in to post in the forum