This question has been flagged
2 Replies
2393 Views

Hello

I want to round totalRemises to the lower multiple

Example: if totalRemises is 1245, I want to round to 1000

// total des remises
            var totalRemises = 0;
            totalRemises = (parseFloat(specialDiscount)/100) * parseFloat(totalDeDepart) ;

Avatar
Discard
Best Answer

Divide the totalRemises by 1000, then use either python's built in floor() or top() function to set it to an integer of 1 or 2. Once that is done, multiply by 1000 again.

Would that help?

Avatar
Discard
Author Best Answer

thanks for your help

Avatar
Discard

If my answer helped you and the problem is solved, please mark it as the correct answer. That way this issue will disappear from the active list, cleaning up a little bit.