Developer forum

Forum » Ecommerce - Standard features » Order discounts and taxes

Order discounts and taxes

Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

When using the flax tax provider and order discounts (not orderline), do the calculations try to account for removing the discount before taxes are applied?

As far as I can tell, it doesn't do this because it would mean distributing the order level discount across all of the lines. I haven't seen any hints that that occurs. 

However, I wanted to confirm for sure before we try to find a workaround. There is a setting that was made available in 9.3.13 called "Apply discount before taxes". However I wasn't able to find out how this impacts the calculations, and I couldn't reproduce a way to see it change the calculation for either order or orderline discounts.

Note that Avalara does handle this. What it does is to distribute the order discount across all of the lines so that the tax per line is reduced. So logically it's possible to do this with the flat tax provider, although I'm sure it's not trivial.

Thanks,

Scott


Replies

 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply

Hi Scott,

I found(I think) a similar post: https://doc.dynamicweb.com/forum/ecommerce-standard-features/ecommerce-standard-features/flat-rate-tax-provider-not-taking-order-discounts-into-account

Is it the same issue?

If yes - It was implemented in Dynamicweb 9.4.10 version

 

Best regards,

Vladimir

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Vladimir,

 

I have another project in 9.4.14 where this does not work. Take a look here.

https://www.screencast.com/t/ugi3jBJXQ

 

Is this the expected behavior?

 

Best Regards,

Nuno Aguiar

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Thanks Nuno for the video. That's what I saw too. It does work with Avalara calculations, but it doesn't appear to with the flat tax provider.

 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply

Hi Scott,

Could you clarify to me few details:

As I see the setting "Apply discount before taxes" really does not work.

But the flat tax provider should take the order discounts into account (at least QA assured me of this). This feature (48972) was implemented in 9.4.10.

If it does not work in 9.4.10 send me please your setup - I will ask QA to retest it.

Kind regards,

Vladimir

 
 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hi Vladimir,

I haven’t been able to make it work correctly, even using a version later than 9.4.10 (9.4.14). I tried a number of different ways, and I watched the EcomOrderLines records too and they didn’t change. Only when performing an orderline discount does it handle the discount before the taxes.

Nuno’s video is very similar to testing that I did, and I got the same results. So, the best that I can tell, it’s not working.

Maybe I don’t understand how it’s supposed to work though. Does it distribute the discount across the lines?

Thanks,

Scott

 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply

Hi Scott,

Yes, it should distribute across tax lines. (I cant say that Nuno's tax is wrong - don't know what % it has)

Anyway, when I reviewed a code for discount distribution across lines I noticed few problems.

I refactored this code completelly - it should appear in nearest hotfix for 9.4 

Best regards,

Vladimir

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Thanks Vladimir. We make good QA testers! smiley We'll test it out on the next hotfix.

 

You must be logged in to post in the forum