Avatar

Level 10

Hi,

Having seen this form before, I suspect that you do want to test against both fields, therefore the script would look something like:

if(AmountNet > 0) then
    $ = AmountNet + VAT
elseif(AmountNet  == 0 and ExchangeRate > 0) then
    $ = AmountForeign / ExchangeRate
endif

the only thing to bear in mind is that even if the user has foreign values in and then inputs values in for GB, the GB will take precedence in the script and appear in the total field.

Hope that helps,

N.