'If' formula help!

we currently work out stage payments depending on contract type ('supply and fit' or 'supply only') we have a new contract type 'New 2023 Terms' which will mean that the second stage payment will either be 40% if contract type is 'supply and fit' or 45% if contract type is 'New 2023 Terms'. 

the field we are looking to amend is 40% Suggested Amount - we want this to check the contract type field and depending whether it says 'supply and fit' or 'new 2023 terms' work out 40% value or 45% value respectively. 

we have the code for it to work out the 40% based on 'supply and fit' but do not know what we should add to make it depend on that cell and change the formula as and when required. 

can anyone help with this (the formula also makes the value on the suggested field change to zero if the client has paid the up to or over the amount up to that payment stage, to signify to our team that the client has nothing outstanding at that payment stage)

ifElse(
equal(round($pr_total_paid_c,2),
round(multiply($pr_payment_gross_value_c,.1),2)),
multiply($pr_payment_gross_value_c,.3),
ifElse(
greaterThan(
$pr_total_paid_c,
multiply($pr_payment_gross_value_c,.1)
)
,"0",
ifElse(
greaterThan($pr_total_paid_c,multiply($pr_payment_gross_value_c,0)),
subtract(multiply($pr_payment_gross_value_c,.4),$pr_total_paid_c),
multiply($pr_payment_gross_value_c,.3)
)

)

)

Parents Reply Children