-
adminafasAsked on May 26, 2020 at 5:49 AM
i'd like to round up all the numbers to integer with final figure 0 or 5
example of how I wish it worked:
the problem is because I have a small shop and at the end of the day at the bank, I can only pour cash and not coins
Page URL: https://form.jotform.com/201462347230041 -
Ariel JotForm SupportReplied on May 26, 2020 at 7:28 AM
Hi adminafas,
We can attain this, by using three Conditional Logic calculations.
The easy part is calculating for TOTALE VERSAMENTO. We only need to get the sum of number1 and number2. The conditional logic would look something like this:
1. A regular check to see if the fields number1 and number2 are filled.
2. Make sure 'ALL' fields mentioned above met the 'filled' condition.
3. number1 + number2
4. Store the result in TOTALE VERSAMENTO.To get TOTALE EFFETTIVO, we can divide it by 5 to meet your figure 0 or 5 condition, use the floor function to get nearest integer down from the result, then multiply it by 5.
1. Check if TOTALE VERSAMENTO has a value.
2. floor(TOTALE VERSAMENTO / 5) * 5
3. Store the result in TOTALE EFFETTIVOFinally, Arrotondamento is as simple as getting the difference of TOTALE EFFETTIVO and TOTALE VERSAMENTO.
1. Check if TOTALE EFFETTIVO has a value.
2. TOTALE VERSAMENTO - TOTALE EFFETTIVO
3. Put the result in ArrotondamentoHere's a sample for to try it out:
https://form.jotform.com/201462674501954Hope that helps! Don't hesitate to reach out if you need further assistance.
-
adminafasReplied on May 26, 2020 at 11:26 AM
you are the boss! thank you
-
adminafasReplied on June 1, 2020 at 6:01 AM
-
roneetReplied on June 1, 2020 at 9:23 AM
To avoid confusion, we have moved the new concern in a separate thread:
https://www.jotform.com/answers/2359711
We will address it shortly.
Thanks.