Open arnold-zhang-jlu opened 4 months ago
In case, anybody is stuck on this problem, The problem arised because both the type of VALUES and GETVALUES() is a string. When you compare two strings, Javascript compares them lexicographically, basically treating the numbers as strings.
For example, when it compares 100 and 90, it first compares the first digits: 1 and 9. Since 9 is greater, it assumes 90 is greater than 100. So, to correct that, put both VALUES AND GETVALUES as arguments in Number(). e.g. Number(values)..
This will ensure correct comparison.
Nice job, @yonathandevpro 👍🏻
Discount Validation has some problems