Formula help

Hi 

I am currently trying to get this field to calculate 10% of gross value if the net value is under £50,000.

if the net value is over £50,000 then I need the field to equal £5,000 plus net value x (VAT rate/100) 

i.e. if VAT rate is 20 (20% vat) and the net value is over £50,000 then the 10% payment amount should be £6,000 (net value of £5,000 plus £1,000 VAT)

if the VAT rate is 0 and the net value is over £50,000 then the 10% payment amount should be £5,000 (net value of £5,000 plus £0 VAT)

this is what i have so far: 

ifElse(
greaterThan(
$pr_net_value_c,
"50000"),
add("5000",(multiply($pr_net_value_c,(divide($pr_payment_rate_c,100))
ifElse(
subtract(multiply($pr_payment_gross_value_c,.1),$pr_total_paid_c)
)

thanks so much for any help in advance

Parents
  • Hi  

    I'm a bit confused here....

    Here is what I got:

    • Gross Value : $pr_payment_gross_value_c
    • Net Value : $pr_net_value_c
    • VAT Rate : $pr_payment_rate_c

    This one I didn't get:

    • $pr_total_paid_c : What is this?

    According to your specification, the formula should be something like that:

    ifElse(
        greaterThan(50000,$pr_net_value_c),
        multiply($pr_payment_gross_value_c,0.1),
        add(5000,multiply($pr_net_value_c,(divide($pr_payment_rate_c,100))))
    )

    However, the calculation from your examples doesn't seem to fit;

    Perhaps we may need a clear/more detailed requirements.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • Hi  

    I'm a bit confused here....

    Here is what I got:

    • Gross Value : $pr_payment_gross_value_c
    • Net Value : $pr_net_value_c
    • VAT Rate : $pr_payment_rate_c

    This one I didn't get:

    • $pr_total_paid_c : What is this?

    According to your specification, the formula should be something like that:

    ifElse(
        greaterThan(50000,$pr_net_value_c),
        multiply($pr_payment_gross_value_c,0.1),
        add(5000,multiply($pr_net_value_c,(divide($pr_payment_rate_c,100))))
    )

    However, the calculation from your examples doesn't seem to fit;

    Perhaps we may need a clear/more detailed requirements.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children