Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Bug in tax providers with multiple lines?

Bug in tax providers with multiple lines?

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I am upgrading a DW 8 site to 9 and ran into an issue with Avalara. The contents of the cart generated multiple tax lines for each product in the cart. Some of these lines have the same product number and name. When that's the case, DW seems to group them without summing their value, causing me to lose some values. This in turn leads to an error like this:

2018-05-14 16:59:12.8614|eCom/CartV2/Errors|ERROR|CART17861|Order CART17861: Price validation failed for order. Order price before fees with VAT: 102.7. Orderlines price with VAT: 113.25. Price difference: 10.55.

See dump #1 for how the database looks for a broken order.

I built a custom version of Avalara that appends a sequence ID to each line which fixes the problem (temporarily).

See dump #2 for how the database looks for a fixed order.

A customer reported a similar issue on DW 8 a while ago (we did an upgrade to the latest 8 in March or so) and the same sequence fixed the issue.

Did something change in how order lines are retrieved or grouped? And what is the right solution going forward?

Thanks!

Imar

1.png 2.png

Replies

 
Victor Letavin
Reply

Hi Imar,

Unfortunately, the information you've provided is not sufficient to detect the problem.
I've repeated creating order with tax providers with different conditions(enable/disable "Organize orderlines so discounts and taxes are grouped with their parent orderlines" setting, restoring cart for signed off user, changing user address, even different tax provider - Vertex), but failed to reproduce the issue. I see no possible code changes in the Avalara provider that might broke this.

Are you getting the situation with this issue stably or in some rare ocasions?


Also the screen dumps describes a bit different situation - instead of "group them without summing their value" it seems more like some extra orderlines exists in "broken order": the "orderlineproductnumber" consist of prefix "Tax Id# " and the tax transaction number, i.e. for 1 order there should be 1 transaction, but the screen 1 shows at least 4 different transaction. Also the error message says that summ of orderlines in the db more than order price stored value.

Could be nice to have test solution, otherwise I don't even know how many additional information required to reproduce the issue at least globalsettings and cart module settings needed.

BR, Viktor.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Having a hard time now reproducing this. It’s still a real issue as it happens occasionally on this and one other site. I'll keep an eye on reproducing it.

Thanks!

 

 

You must be logged in to post in the forum