Hi i am trying to figure out the 50% payment calculation that brings the account balance up to 90% or 95% depending on the payment stage beforehand, which is dictated by project type.
This calculation is for the 'suggested payment amount' for this payment stage (50% of gross value)
if the project type is "supply and fit 2023" it needs to calculate 50% of the gross, but the total that should bring the account up to is 95% paid.
the "supply and fit" project type - is the same but 90% paid, when including the 50% payment we are discussing.
i seem to be having parenthesis issues again
ifElse(
equal($pr_project_type_c,"supply and fit 2023"),
greaterThan(
$pr_total_paid_c,
multiply($pr_payment_gross_value_c,.95)
)
,"0",
ifElse(
greaterThan($pr_total_paid_c,multiply($pr_payment_gross_value_c,.45)),
subtract(multiply($pr_payment_gross_value_c,.95),$pr_total_paid_c),
ifElse(
equal($pr_project_type_c,"Supply and Fit"),
greaterThan($pr_total_paid_c,
multiply($pr_payment_gross_value_c,.9)
,"0",)
ifElse(
greaterThan($pr_total_paid_c,multiply($pr_payment_gross_value_c,.4)),
subtract(multiply($pr_payment_gross_value_c,.9),$pr_total_paid_c)
)
)
)
)