4 Replies Latest reply on Jan 5, 2010 10:02 AM by richardellis

    Calculating VAT


      I am working on a form that requires calculating the VAT amount.


      I have used the following;


      var f = this.getField('field1');
      var v = this.getField('checkbox1');
          var vat = f.value * 0.175;
          var vat = 0;


      event.value= f.value * 3 + vat;


      But all this is doing is multiplying the pre VAT price by 3 to give the inc VAT price, which is incorrect.


      What I actually need is a script that sees the value of a field calculates the VAT and shows the result. Does anyone have any ideas?


      Thanks in advance.!