Developer forum

Forum » Ecommerce - Standard features » Rounding of VAT in DW vs DIBS

Rounding of VAT in DW vs DIBS

Morten
Reply

Got a item with a price-tag 522,90 DKK without VAT. Solution setup with prices without VAT in DB as recommended (We strongly recommend that you provide prices excluding VAT on your products).
VAT on the above items is 130,725 DKK - which should be rounded to 130,73 DKK.

If I add three of the above items to the cart the total is calculated (with VAT) to 1960,88.
I guess that DW is calculating the orderline price by multipling the product price with quantity in the cart - and tjek adds vat
This is, in my appoinon, not correct. And when I choose to add a DIBS payment gateway to the cart, this is what will be posted to the gateway:
Total amount 1960,88
Product, Quantity (3), Price With Out VAT (522,90), VAT (130,73).
DIBS calculates the above orderline to the correct amount: 1960,89 (653,63 * 3)
Unfortunally this dosent match the total amount send together with the order (1960,88) and therefor it fails.

My question:
Can I make a priceprovidor to overwrite the VAT calculation to make sure it calculated correct? Example? I could’nt find a way to do this :/

The above is tested on 8.9.2.9, 8.9.2.6, 8.9.2.0, 8.9.1.7

/Morten


Replies

 
Nicolai Pedersen
Reply

Hey mr. White!

I would argue DIBS is doing things wrong - it is a matter of definition. Have you checked they cannot calculate the other way around?

Anyways - in live integration we have an example of how to recalculate an order. In that example you can see that the AllowOverridePrices on the order is set to true - telling Dynamicweb to fuck off on all price calculations.

The live integration code can be found here: http://doc.dynamicweb.com/releases-and-downloads/downloads

Another option is to use a different DIBS template that does not send that many details.

BR Nicolai

 
Morten
Reply

Hey Mr. Hawk ;)

Thank you for the quick reply and feedback. Im sorry to say - but I dont think DIBS is doing it wrong.
All the values comes from DW and are posted from DW. Please have a look at the attached screen containg the post-data. This is without using any template - using autopost (no templates).

Please also have a look at the screen "Skærmbillede 2017-09-25 kl. 21.17.20.png".
This is the DW ordre step 1. - try to multiply amount shown ;)
653,63 * 3 = ???? :D

Anyway - I'll give it a shot with another DIBS templates without autopost. In the meantime I hope you guys will have a look at this case.

/Morten

 

 

dibs.png Skærmbillede_2017-09-25_kl._21.17.20.png
 
Nicolai Pedersen
Reply
This post has been marked as an answer

Do you by any chance use the "DIBS Payment Window" instead of the "DIBS Flexwin"?

Votes for this answer: 1
 
Nicolai Pedersen
Reply

I øvrigt kan jeg tilføje at i følge digitaliserings styrelsens vejledning for afrunding, er linie afrundinger vejledende og der skal beregnes moms på subtotalen (og den afrundes så):

http://www.oioubl.info/documents/da/da/Guidelines/OIOUBL_GUIDE_SKAT.pdf

I følge loven er begge modeller gyldige - og der kan frit afrundes op eller ned til en hel enhed hvis man har lyst.

Bogførings systemer, f.eks. Economics gør det også som i DW: http://wiki2.e-conomic.dk/generelt/afrundingsregler

Men det ændrer ikke ved der er en fejl i vores dibs gateway :-).

 
Morten
Reply

Check, we'll be using the Flexwin instead. And it works ;)

 
Morten
Reply

wink

 

You must be logged in to post in the forum