• Resolved b1026q9

    (@b1026q9)


    I created the import duty calculation form and I would like the prices appearing there to be ignoring or rounding the last two digits.

    Tried ROUND(A,-2) but not working.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @b1026q9

    You should use the PREC operation.

    PREC(X,Y) returns the number X rounded to Y decimal places.

    So, assuming your current equation is: fieldname1*fieldname2, you simply should edit it as follows:

    PREC(fieldname1*fieldname2, 2)

    and that’s all.
    Best regards.

    Thread Starter b1026q9

    (@b1026q9)

    My current equation is

    fieldname2*0.6*fieldname3/100

    and it has for example the value of 3060. Now with your suggestion, it gives the value of 3060.00

    Plugin Author codepeople

    (@codepeople)

    Hello @b1026q9

    And what is the value you want to get exactly in this case?

    Best regards.

    Thread Starter b1026q9

    (@b1026q9)

    3100

    Plugin Author codepeople

    (@codepeople)

    Hello @b1026q9

    It is simply mathematics. The solution would be: ROUND(X/100)*100

    ROUND(3060/100)*100 =
    ROUND(30.60)*100 =
    31*100 = 3100

    So, if your current equation is: fieldname2*0.6*fieldname3/100 it should be edited as follows:

    ROUND((fieldname2*0.6*fieldname3/100)/100)*100

    and that’s all.
    Best regards.

    Thread Starter b1026q9

    (@b1026q9)

    Thank you so much for this excellent help!

    Plugin Author codepeople

    (@codepeople)

    Hello @b1026q9

    It has been a pleasure.

    Best regards.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to 3060 to 3100’ is closed to new replies.