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

    (@codepeople)

    Hi,

    Could you indicate all values you are entering and the value should be returned, please?

    Best regards.

    Thread Starter WillBigGun

    (@willbiggun)

    shape: square
    height: 100
    width: 50
    colours: 4
    Material: Vinyl Resin
    Artwork not provided
    Presentation: single
    Amount 2500

    Plugin Author codepeople

    (@codepeople)

    Hi,

    The values you sent me provoke that the value of fieldname50 = 2500, and the value of fieldname68 would be 1. So, replacing the values in the equation:

    (function(){ if(2500 == ‘0’) return ‘0’; if(1 == ‘Price on its way via email’) return ‘N/A’; else return NUMBERFORMAT(1/2500, ‘GBP’); })()

    But 1/2500 = 0.0004, and converted to currency format would be “£0.00”

    I’m sorry, but the support service is not for debugging your particular code, or correct your equations. Please, if you want a debugging service, or cutomization service, you should contact us through our support page:

    https://wordpress.dwbooster.com/support

    Best regards.

    Thread Starter WillBigGun

    (@willbiggun)

    Hi there,
    This doesnt make sense because the formula triggers the field to divide £1,460 by 2500

    https://bgshow.me/PreviewDesigns/Capture.JPG

    Fieldname68 contains the formula
    NUMBERFORMAT(fieldname8+fieldname64+fieldname3, ‘GBP’)

    The ‘Total Each including Options’ field contains the formula
    NUMBERFORMAT(fieldname68/fieldname50, ‘GBP’)

    This basically is asking £1460 to be divided by 2500 but it shows as £0.00 and not £0.57

    Plugin Author codepeople

    (@codepeople)

    Hi,

    I’m sorry, I had not checked the format of field: “Total Including Options – Q1”. If you are using the NUMBERFORMAT operation to get a result with the format of currency, the result of operation would be a number including comma symbols as thousands separator. So, you should enter the comma symbol (,) in the attribute: “Symbol for grouping thousands (Ex: 3,000,000)” of field, if it will be used in other operations.

    Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Number formatting’ is closed to new replies.