Developer forum

Forum » Ecommerce - Standard features » Decimals in discount percentage

Decimals in discount percentage

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have noticed that the discount input in Disocunt settings does not allow for decimals but just integers.

 I have a situation where the discount needs to be with decimals because it is applied to the value with VAT and I don't seem to be able to avoid that behavior and therefore I need to adjust the value of the discount.

I am using DW 9.6.12.

I have also noticed similar behavior in the interface for setting VAT rates for countries in an older version of DW (9.4.14).

It seems like a UI bug to me.

Thank you,

Adrian


Replies

 
Nicolai Pedersen
Reply

A 10% discount on a value with and without VAT will be the same (given the VAT is a percentage as well)... Otherwise I have to go back to school. The entire concept of percentages is that they are relative...... Or what am I missing??

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I have probably not expressed it correctly. It's not about math.

If you have a VAT rate of 8.2% you cannot enter 8.2 it in the UI. It will only allow for 8 or 7.

Does it make sense?

Adrian

 

 
Nicolai Pedersen
Reply

You cannot make a discount of 8.2%. I cannot see why discounts has anything to do about VAT.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Let's not complicate things. I have probably provided more information than needed.

Please have a look at the UI for entering VAT values for countries. The input will not allow values with decimals.

I am talking about Settings/Ecommerce/Internationalization/VAT Groups

I am not sure if usually, VAT rates have decimals or not but I had a request for a Swiss website to add a VAT value that had decimals. And I could not add it from the UI.

I had to add it directly to the database.

That's my main concern.

And I have seen the same behavior for discounts. It does not matter why the customer wanted to add a discount with decimals.There were good reasons but I don't want to lose focus on the main issue which is the UI. 

 

Thank you,

Adrian

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

The only connection between the 2 is the behavior of the input. It allows for decimals for neither one of them.

And, please, allow me to disagree with you on the discount part. It can have decimals. I had at least one specific situation that required it to have decimals. I don't think we need to elaborate on why it needed decimals.

Now, if you want to support it or not, it is a different story. So far, the whole system supports it, except for the input field that only allows for integers. At least in the version I have checked.

Thank you,

Adrian

 

 

 
Nicolai Pedersen
Reply

Ok - I got confused...

"I have a situation where the discount needs to be with decimals because it is applied to the value with VAT".

Which I do not understand and also disagrees with...

"I have noticed that the discount input in Disocunt settings does not allow for decimals but just integers."

Which you can...

You can also use decimals in country VAT.

So - what is your question? To support decimals for VAT group country rates?

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Sorry I got you confused.

My only request was to change the input fields on the discount settings and VAT setting to allow values with decimals.

On the versions that I have tested with, I could not enter decimals. The last version I have checked (just now) is 9.6.12

It seems that the input for discount allows for decimals but the VAT one does not. I have attached a screenshot.

Thank you for your patience.

Adrian

VAT_Input.png
 
Nicolai Pedersen
Reply

Decimals for vat groups, check.

Decimals for discounts in 9.6.12 you can already. See dump

CaptureDiscounts.PNG
 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

The issue with input fields for entering VAT percent on VAT groups has been registered as a bug...

Bug 73652: Input fields for VAT percent does not allow decimal numbers

Best regards,
Morten

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Thank you

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Adrian

The problem regarding #73652 "Input fields for VAT percent does not allow decimal numbers" has now been resolved in Dynamicweb version 9.7.6

To upgrade please choose this version from download:

http://doc.dynamicweb.com/releases-and-downloads/releases

Let me know if you need any more help regarding this

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum