• Resolved MasG

    (@dhevilz)


    haii.. thanks for awesome plugin…

    i want to ask for you,
    I want to use the multiplication formula, for example (fieldname1*fieldname2) results in (fieldname3)
    but, in fieldname3

    when result
    – 1,000.69 is shown 1,001
    – 1,000.79 is shown 1,001
    – 1,000.89 is shown 1,001
    – 1,000.99 is shown 1,001

    when 1,000.68 is shown 1,000
    – 1,000.59 is shown 1,000
    – 1,000.49 is shown 1,000
    – 1,000.39 is shown 1,000
    – 1,000.29 is shown 1,000
    – 1.000.19 is shown 1,000
    – 1,000.09 is shown 1,000

    how i write this formula?

    thx

    The page I need help with: [log in to see the link]

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

    (@codepeople)

    Hello @dhevilz

    Thank you very much for using our plugin. A possible solution should be to check the decimal component of the result before applying the CEIL or FLOOR operations.

    For example, your equation can be re-implemented as follows:

    (function(){
    var result = fieldname1*fieldname2;
    if(result-FLOOR(result) <= 0.68) return FLOOR(result);
    return CEIL(result);
    })()

    Best regards.

    Thread Starter MasG

    (@dhevilz)

    code works fine, code works fine..

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ROUND’ is closed to new replies.